Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: Source/core/page/Page.h

Issue 901663005: Revert r189385 "Remove LifecycleContext" and r189391, r189530, r189456 that block it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef Page_h 21 #ifndef Page_h
22 #define Page_h 22 #define Page_h
23 23
24 #include "core/dom/ViewportDescription.h" 24 #include "core/dom/ViewportDescription.h"
25 #include "core/frame/LocalFrame.h" 25 #include "core/frame/LocalFrame.h"
26 #include "core/frame/SettingsDelegate.h" 26 #include "core/frame/SettingsDelegate.h"
27 #include "core/frame/UseCounter.h" 27 #include "core/frame/UseCounter.h"
28 #include "core/page/PageAnimator.h" 28 #include "core/page/PageAnimator.h"
29 #include "core/page/PageLifecycleNotifier.h"
30 #include "core/page/PageVisibilityState.h" 29 #include "core/page/PageVisibilityState.h"
30 #include "platform/LifecycleContext.h"
31 #include "platform/Supplementable.h" 31 #include "platform/Supplementable.h"
32 #include "platform/geometry/LayoutRect.h" 32 #include "platform/geometry/LayoutRect.h"
33 #include "platform/geometry/Region.h" 33 #include "platform/geometry/Region.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 #include "wtf/HashSet.h" 36 #include "wtf/HashSet.h"
37 #include "wtf/Noncopyable.h" 37 #include "wtf/Noncopyable.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class AutoscrollController; 42 class AutoscrollController;
43 class Chrome; 43 class Chrome;
44 class ChromeClient; 44 class ChromeClient;
45 class ClientRectList; 45 class ClientRectList;
46 class ContextMenuClient; 46 class ContextMenuClient;
47 class ContextMenuController; 47 class ContextMenuController;
48 class Document; 48 class Document;
49 class DragCaretController; 49 class DragCaretController;
50 class DragClient; 50 class DragClient;
51 class DragController; 51 class DragController;
52 class EditorClient; 52 class EditorClient;
53 class FocusController; 53 class FocusController;
54 class Frame; 54 class Frame;
55 class FrameHost; 55 class FrameHost;
56 class InspectorClient; 56 class InspectorClient;
57 class InspectorController; 57 class InspectorController;
58 class PageLifecycleNotifier;
58 class PluginData; 59 class PluginData;
59 class PointerLockController; 60 class PointerLockController;
60 class ScrollingCoordinator; 61 class ScrollingCoordinator;
61 class Settings; 62 class Settings;
62 class SpellCheckerClient; 63 class SpellCheckerClient;
63 class UndoStack; 64 class UndoStack;
64 class ValidationMessageClient; 65 class ValidationMessageClient;
65 66
66 typedef uint64_t LinkHash; 67 typedef uint64_t LinkHash;
67 68
68 float deviceScaleFactor(LocalFrame*); 69 float deviceScaleFactor(LocalFrame*);
69 70
70 class Page final : public NoBaseWillBeGarbageCollectedFinalized<Page>, public Wi llBeHeapSupplementable<Page>, public PageLifecycleNotifier, public SettingsDeleg ate { 71 class Page final : public NoBaseWillBeGarbageCollectedFinalized<Page>, public Wi llBeHeapSupplementable<Page>, public LifecycleContext<Page>, public SettingsDele gate {
71 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Page); 72 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Page);
72 WTF_MAKE_NONCOPYABLE(Page); 73 WTF_MAKE_NONCOPYABLE(Page);
73 friend class Settings; 74 friend class Settings;
74 public: 75 public:
75 static void platformColorsChanged(); 76 static void platformColorsChanged();
76 77
77 // 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.
78 struct PageClients { 79 struct PageClients {
79 WTF_MAKE_NONCOPYABLE(PageClients); WTF_MAKE_FAST_ALLOCATED; 80 WTF_MAKE_NONCOPYABLE(PageClients); WTF_MAKE_FAST_ALLOCATED;
80 public: 81 public:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 }; 191 };
191 192
192 void addMultisamplingChangedObserver(MultisamplingChangedObserver*); 193 void addMultisamplingChangedObserver(MultisamplingChangedObserver*);
193 void removeMultisamplingChangedObserver(MultisamplingChangedObserver*); 194 void removeMultisamplingChangedObserver(MultisamplingChangedObserver*);
194 195
195 void didCommitLoad(LocalFrame*); 196 void didCommitLoad(LocalFrame*);
196 197
197 void acceptLanguagesChanged(); 198 void acceptLanguagesChanged();
198 199
199 static void networkStateChanged(bool online); 200 static void networkStateChanged(bool online);
201 PassOwnPtr<LifecycleNotifier<Page>> createLifecycleNotifier();
200 202
201 void trace(Visitor*); 203 void trace(Visitor*);
202 void willBeDestroyed(); 204 void willBeDestroyed();
203 205
206 protected:
207 PageLifecycleNotifier& lifecycleNotifier();
208
204 private: 209 private:
205 void initGroup(); 210 void initGroup();
206 211
207 void setTimerAlignmentInterval(double); 212 void setTimerAlignmentInterval(double);
208 213
209 void setNeedsLayoutInAllFrames(); 214 void setNeedsLayoutInAllFrames();
210 215
211 // SettingsDelegate overrides. 216 // SettingsDelegate overrides.
212 virtual void settingsChanged(SettingsDelegate::ChangeType) override; 217 virtual void settingsChanged(SettingsDelegate::ChangeType) override;
213 218
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver>> m_mu ltisamplingChangedObservers; 270 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver>> m_mu ltisamplingChangedObservers;
266 271
267 // A pointer to all the interfaces provided to in-process Frames for this Pa ge. 272 // A pointer to all the interfaces provided to in-process Frames for this Pa ge.
268 // FIXME: Most of the members of Page should move onto FrameHost. 273 // FIXME: Most of the members of Page should move onto FrameHost.
269 OwnPtrWillBeMember<FrameHost> m_frameHost; 274 OwnPtrWillBeMember<FrameHost> m_frameHost;
270 }; 275 };
271 276
272 } // namespace blink 277 } // namespace blink
273 278
274 #endif // Page_h 279 #endif // Page_h
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698