1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef ZoomConstraintsClient_h_
8 #define ZoomConstraintsClient_h_
10 #include "mozilla/layers/ScrollableLayerGuid.h"
11 #include "mozilla/Maybe.h"
13 #include "nsIDOMEventListener.h"
14 #include "nsIObserver.h"
21 } // namespace mozilla
23 class ZoomConstraintsClient final
: public nsIDOMEventListener
,
27 NS_DECL_NSIDOMEVENTLISTENER
30 ZoomConstraintsClient();
33 ~ZoomConstraintsClient();
36 void Init(mozilla::PresShell
* aPresShell
, mozilla::dom::Document
* aDocument
);
38 void ScreenSizeChanged();
41 void RefreshZoomConstraints();
43 RefPtr
<mozilla::dom::Document
> mDocument
;
44 // raw ref since the presShell owns this
45 mozilla::PresShell
* MOZ_NON_OWNING_REF mPresShell
;
46 nsCOMPtr
<mozilla::dom::EventTarget
> mEventTarget
;
47 mozilla::Maybe
<mozilla::layers::ScrollableLayerGuid
> mGuid
;