| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "core/frame/Deprecation.h" | 26 #include "core/frame/Deprecation.h" |
| 27 #include "core/frame/HostsUsingFeatures.h" | 27 #include "core/frame/HostsUsingFeatures.h" |
| 28 #include "core/frame/LocalFrame.h" | 28 #include "core/frame/LocalFrame.h" |
| 29 #include "core/frame/SettingsDelegate.h" | 29 #include "core/frame/SettingsDelegate.h" |
| 30 #include "core/frame/UseCounter.h" | 30 #include "core/frame/UseCounter.h" |
| 31 #include "core/page/Page.h" | 31 #include "core/page/Page.h" |
| 32 #include "core/page/PageAnimator.h" | 32 #include "core/page/PageAnimator.h" |
| 33 #include "core/page/PageLifecycleNotifier.h" | 33 #include "core/page/PageLifecycleNotifier.h" |
| 34 #include "core/page/PageLifecycleObserver.h" | 34 #include "core/page/PageLifecycleObserver.h" |
| 35 #include "core/page/PageVisibilityState.h" | 35 #include "core/page/PageVisibilityState.h" |
| 36 #include "platform/MemoryPurgeController.h" | |
| 37 #include "platform/Supplementable.h" | 36 #include "platform/Supplementable.h" |
| 38 #include "platform/Timer.h" | 37 #include "platform/Timer.h" |
| 39 #include "platform/geometry/LayoutRect.h" | 38 #include "platform/geometry/LayoutRect.h" |
| 40 #include "platform/geometry/Region.h" | 39 #include "platform/geometry/Region.h" |
| 41 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
| 42 #include "wtf/Forward.h" | 41 #include "wtf/Forward.h" |
| 43 #include "wtf/HashSet.h" | 42 #include "wtf/HashSet.h" |
| 44 #include "wtf/Noncopyable.h" | 43 #include "wtf/Noncopyable.h" |
| 45 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 46 | 45 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 64 class Settings; | 63 class Settings; |
| 65 class SpellCheckerClient; | 64 class SpellCheckerClient; |
| 66 class UndoStack; | 65 class UndoStack; |
| 67 class ValidationMessageClient; | 66 class ValidationMessageClient; |
| 68 class WebLayerTreeView; | 67 class WebLayerTreeView; |
| 69 | 68 |
| 70 typedef uint64_t LinkHash; | 69 typedef uint64_t LinkHash; |
| 71 | 70 |
| 72 float deviceScaleFactor(LocalFrame*); | 71 float deviceScaleFactor(LocalFrame*); |
| 73 | 72 |
| 74 class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, public Su
pplementable<Page>, public PageLifecycleNotifier, public SettingsDelegate, publi
c MemoryPurgeClient { | 73 class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>, public Su
pplementable<Page>, public PageLifecycleNotifier, public SettingsDelegate { |
| 75 USING_GARBAGE_COLLECTED_MIXIN(Page); | 74 USING_GARBAGE_COLLECTED_MIXIN(Page); |
| 76 WTF_MAKE_NONCOPYABLE(Page); | 75 WTF_MAKE_NONCOPYABLE(Page); |
| 77 friend class Settings; | 76 friend class Settings; |
| 78 public: | 77 public: |
| 79 // It is up to the platform to ensure that non-null clients are provided whe
re required. | 78 // It is up to the platform to ensure that non-null clients are provided whe
re required. |
| 80 struct CORE_EXPORT PageClients final { | 79 struct CORE_EXPORT PageClients final { |
| 81 STACK_ALLOCATED(); | 80 STACK_ALLOCATED(); |
| 82 WTF_MAKE_NONCOPYABLE(PageClients); | 81 WTF_MAKE_NONCOPYABLE(PageClients); |
| 83 public: | 82 public: |
| 84 PageClients(); | 83 PageClients(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 105 using PageSet = PersistentHeapHashSet<WeakMember<Page>>; | 104 using PageSet = PersistentHeapHashSet<WeakMember<Page>>; |
| 106 | 105 |
| 107 // Return the current set of full-fledged, ordinary pages. | 106 // Return the current set of full-fledged, ordinary pages. |
| 108 // Each created and owned by a WebView. | 107 // Each created and owned by a WebView. |
| 109 // | 108 // |
| 110 // This set does not include Pages created for other, internal purposes | 109 // This set does not include Pages created for other, internal purposes |
| 111 // (SVGImages, inspector overlays, page popups etc.) | 110 // (SVGImages, inspector overlays, page popups etc.) |
| 112 static PageSet& ordinaryPages(); | 111 static PageSet& ordinaryPages(); |
| 113 | 112 |
| 114 static void platformColorsChanged(); | 113 static void platformColorsChanged(); |
| 115 static void onMemoryPressure(); | |
| 116 | 114 |
| 117 FrameHost& frameHost() const { return *m_frameHost; } | 115 FrameHost& frameHost() const { return *m_frameHost; } |
| 118 | 116 |
| 119 void setNeedsRecalcStyleInAllFrames(); | 117 void setNeedsRecalcStyleInAllFrames(); |
| 120 void updateAcceleratedCompositingSettings(); | 118 void updateAcceleratedCompositingSettings(); |
| 121 | 119 |
| 122 ViewportDescription viewportDescription() const; | 120 ViewportDescription viewportDescription() const; |
| 123 | 121 |
| 124 static void refreshPlugins(); | 122 static void refreshPlugins(); |
| 125 PluginData* pluginData() const; | 123 PluginData* pluginData() const; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 void setIsPainting(bool painting) { m_isPainting = painting; } | 193 void setIsPainting(bool painting) { m_isPainting = painting; } |
| 196 bool isPainting() const { return m_isPainting; } | 194 bool isPainting() const { return m_isPainting; } |
| 197 #endif | 195 #endif |
| 198 | 196 |
| 199 void didCommitLoad(LocalFrame*); | 197 void didCommitLoad(LocalFrame*); |
| 200 | 198 |
| 201 void acceptLanguagesChanged(); | 199 void acceptLanguagesChanged(); |
| 202 | 200 |
| 203 static void networkStateChanged(bool online); | 201 static void networkStateChanged(bool online); |
| 204 | 202 |
| 205 MemoryPurgeController& memoryPurgeController(); | |
| 206 | |
| 207 void purgeMemory(DeviceKind) override; | |
| 208 | |
| 209 DECLARE_TRACE(); | 203 DECLARE_TRACE(); |
| 210 | 204 |
| 211 void layerTreeViewInitialized(WebLayerTreeView&); | 205 void layerTreeViewInitialized(WebLayerTreeView&); |
| 212 void willCloseLayerTreeView(WebLayerTreeView&); | 206 void willCloseLayerTreeView(WebLayerTreeView&); |
| 213 | 207 |
| 214 void willBeDestroyed(); | 208 void willBeDestroyed(); |
| 215 | 209 |
| 216 private: | 210 private: |
| 217 explicit Page(PageClients&); | 211 explicit Page(PageClients&); |
| 218 | 212 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 bool m_isCursorVisible; | 264 bool m_isCursorVisible; |
| 271 | 265 |
| 272 #if ENABLE(ASSERT) | 266 #if ENABLE(ASSERT) |
| 273 bool m_isPainting; | 267 bool m_isPainting; |
| 274 #endif | 268 #endif |
| 275 | 269 |
| 276 // A pointer to all the interfaces provided to in-process Frames for this Pa
ge. | 270 // A pointer to all the interfaces provided to in-process Frames for this Pa
ge. |
| 277 // FIXME: Most of the members of Page should move onto FrameHost. | 271 // FIXME: Most of the members of Page should move onto FrameHost. |
| 278 Member<FrameHost> m_frameHost; | 272 Member<FrameHost> m_frameHost; |
| 279 | 273 |
| 280 Member<MemoryPurgeController> m_memoryPurgeController; | |
| 281 | |
| 282 Timer<Page> m_timerForCompressStrings; | 274 Timer<Page> m_timerForCompressStrings; |
| 283 }; | 275 }; |
| 284 | 276 |
| 285 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; | 277 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; |
| 286 | 278 |
| 287 } // namespace blink | 279 } // namespace blink |
| 288 | 280 |
| 289 #endif // Page_h | 281 #endif // Page_h |
| OLD | NEW |