| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 class PointerLockController; | 62 class PointerLockController; |
| 63 class ScopedPageSuspender; | 63 class ScopedPageSuspender; |
| 64 class ScrollingCoordinator; | 64 class ScrollingCoordinator; |
| 65 class Settings; | 65 class Settings; |
| 66 class SpellCheckerClient; | 66 class SpellCheckerClient; |
| 67 class ValidationMessageClient; | 67 class ValidationMessageClient; |
| 68 class WebLayerTreeView; | 68 class WebLayerTreeView; |
| 69 | 69 |
| 70 typedef uint64_t LinkHash; | 70 typedef uint64_t LinkHash; |
| 71 | 71 |
| 72 float deviceScaleFactor(LocalFrame*); | 72 float deviceScaleFactorDeprecated(LocalFrame*); |
| 73 | 73 |
| 74 class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, | 74 class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, |
| 75 public Supplementable<Page>, | 75 public Supplementable<Page>, |
| 76 public PageVisibilityNotifier, | 76 public PageVisibilityNotifier, |
| 77 public SettingsDelegate { | 77 public SettingsDelegate { |
| 78 USING_GARBAGE_COLLECTED_MIXIN(Page); | 78 USING_GARBAGE_COLLECTED_MIXIN(Page); |
| 79 WTF_MAKE_NONCOPYABLE(Page); | 79 WTF_MAKE_NONCOPYABLE(Page); |
| 80 friend class Settings; | 80 friend class Settings; |
| 81 | 81 |
| 82 public: | 82 public: |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // https://html.spec.whatwg.org/multipage/webappapis.html#simple-dialogs | 192 // https://html.spec.whatwg.org/multipage/webappapis.html#simple-dialogs |
| 193 // | 193 // |
| 194 // Per https://html.spec.whatwg.org/multipage/webappapis.html#pause, no loads | 194 // Per https://html.spec.whatwg.org/multipage/webappapis.html#pause, no loads |
| 195 // are allowed to start/continue in this state, and all background processing | 195 // are allowed to start/continue in this state, and all background processing |
| 196 // is also suspended. | 196 // is also suspended. |
| 197 bool suspended() const { return m_suspended; } | 197 bool suspended() const { return m_suspended; } |
| 198 | 198 |
| 199 void setPageScaleFactor(float); | 199 void setPageScaleFactor(float); |
| 200 float pageScaleFactor() const; | 200 float pageScaleFactor() const; |
| 201 | 201 |
| 202 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 202 // Corresponds to pixel density of the device where this Page is |
| 203 void setDeviceScaleFactor(float); | 203 // being displayed. In multi-monitor setups this can vary between pages. |
| 204 // This value does not account for Page zoom, use LocalFrame::devicePixelRatio |
| 205 // instead. This is to be deprecated. Use this with caution. |
| 206 // 1) If you need to scale the content per device scale factor, this is still |
| 207 // valid. In use-zoom-for-dsf mode, this is always 1, and will be remove |
| 208 // when transition is complete. |
| 209 // 2) If you want to compute the device related measure (such as device pixel |
| 210 // height, or the scale factor for drag image), use |
| 211 // ChromeClient::screenInfo() instead. |
| 212 float deviceScaleFactorDeprecated() const { return m_deviceScaleFactor; } |
| 213 void setDeviceScaleFactorDeprecated(float); |
| 204 | 214 |
| 205 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); | 215 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); |
| 206 static void visitedStateChanged(LinkHash visitedHash); | 216 static void visitedStateChanged(LinkHash visitedHash); |
| 207 | 217 |
| 208 void setVisibilityState(PageVisibilityState, bool); | 218 void setVisibilityState(PageVisibilityState, bool); |
| 209 PageVisibilityState visibilityState() const; | 219 PageVisibilityState visibilityState() const; |
| 210 bool isPageVisible() const; | 220 bool isPageVisible() const; |
| 211 | 221 |
| 212 bool isCursorVisible() const; | 222 bool isCursorVisible() const; |
| 213 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } | 223 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // Page. | 310 // Page. |
| 301 // FIXME: Most of the members of Page should move onto FrameHost. | 311 // FIXME: Most of the members of Page should move onto FrameHost. |
| 302 Member<FrameHost> m_frameHost; | 312 Member<FrameHost> m_frameHost; |
| 303 }; | 313 }; |
| 304 | 314 |
| 305 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; | 315 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; |
| 306 | 316 |
| 307 } // namespace blink | 317 } // namespace blink |
| 308 | 318 |
| 309 #endif // Page_h | 319 #endif // Page_h |
| OLD | NEW |