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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameHost.cpp

Issue 2214263003: CustomElements: taking CustomElementReactionStack out of frameHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.h ('k') | no next file » | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "core/frame/FrameHost.h" 31 #include "core/frame/FrameHost.h"
32 32
33 #include "core/dom/custom/CustomElementReactionStack.h"
34 #include "core/frame/EventHandlerRegistry.h" 33 #include "core/frame/EventHandlerRegistry.h"
35 #include "core/frame/FrameView.h" 34 #include "core/frame/FrameView.h"
36 #include "core/frame/PageScaleConstraints.h" 35 #include "core/frame/PageScaleConstraints.h"
37 #include "core/frame/PageScaleConstraintsSet.h" 36 #include "core/frame/PageScaleConstraintsSet.h"
38 #include "core/frame/TopControls.h" 37 #include "core/frame/TopControls.h"
39 #include "core/frame/VisualViewport.h" 38 #include "core/frame/VisualViewport.h"
40 #include "core/inspector/ConsoleMessageStorage.h" 39 #include "core/inspector/ConsoleMessageStorage.h"
41 #include "core/page/Page.h" 40 #include "core/page/Page.h"
42 #include "core/page/scrolling/OverscrollController.h" 41 #include "core/page/scrolling/OverscrollController.h"
43 #include "public/platform/Platform.h" 42 #include "public/platform/Platform.h"
44 #include "public/platform/WebScheduler.h" 43 #include "public/platform/WebScheduler.h"
45 44
46 namespace blink { 45 namespace blink {
47 46
48 FrameHost* FrameHost::create(Page& page) 47 FrameHost* FrameHost::create(Page& page)
49 { 48 {
50 return new FrameHost(page); 49 return new FrameHost(page);
51 } 50 }
52 51
53 FrameHost::FrameHost(Page& page) 52 FrameHost::FrameHost(Page& page)
54 : m_page(&page) 53 : m_page(&page)
55 , m_topControls(TopControls::create(*this)) 54 , m_topControls(TopControls::create(*this))
56 , m_pageScaleConstraintsSet(PageScaleConstraintsSet::create()) 55 , m_pageScaleConstraintsSet(PageScaleConstraintsSet::create())
57 , m_visualViewport(VisualViewport::create(*this)) 56 , m_visualViewport(VisualViewport::create(*this))
58 , m_overscrollController(OverscrollController::create( 57 , m_overscrollController(OverscrollController::create(
59 *m_visualViewport, 58 *m_visualViewport,
60 m_page->chromeClient())) 59 m_page->chromeClient()))
61 , m_eventHandlerRegistry(new EventHandlerRegistry(*this)) 60 , m_eventHandlerRegistry(new EventHandlerRegistry(*this))
62 , m_consoleMessageStorage(new ConsoleMessageStorage()) 61 , m_consoleMessageStorage(new ConsoleMessageStorage())
63 , m_customElementReactionStack(new CustomElementReactionStack())
64 , m_subframeCount(0) 62 , m_subframeCount(0)
65 { 63 {
66 } 64 }
67 65
68 // Explicitly in the .cpp to avoid default constructor in .h 66 // Explicitly in the .cpp to avoid default constructor in .h
69 FrameHost::~FrameHost() 67 FrameHost::~FrameHost()
70 { 68 {
71 } 69 }
72 70
73 Page& FrameHost::page() 71 Page& FrameHost::page()
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 ConsoleMessageStorage& FrameHost::consoleMessageStorage() 176 ConsoleMessageStorage& FrameHost::consoleMessageStorage()
179 { 177 {
180 return *m_consoleMessageStorage; 178 return *m_consoleMessageStorage;
181 } 179 }
182 180
183 const ConsoleMessageStorage& FrameHost::consoleMessageStorage() const 181 const ConsoleMessageStorage& FrameHost::consoleMessageStorage() const
184 { 182 {
185 return *m_consoleMessageStorage; 183 return *m_consoleMessageStorage;
186 } 184 }
187 185
188 CustomElementReactionStack& FrameHost::customElementReactionStack()
189 {
190 return *m_customElementReactionStack;
191 }
192
193 const CustomElementReactionStack& FrameHost::customElementReactionStack() const
194 {
195 return *m_customElementReactionStack;
196 }
197
198 DEFINE_TRACE(FrameHost) 186 DEFINE_TRACE(FrameHost)
199 { 187 {
200 visitor->trace(m_page); 188 visitor->trace(m_page);
201 visitor->trace(m_topControls); 189 visitor->trace(m_topControls);
202 visitor->trace(m_visualViewport); 190 visitor->trace(m_visualViewport);
203 visitor->trace(m_overscrollController); 191 visitor->trace(m_overscrollController);
204 visitor->trace(m_eventHandlerRegistry); 192 visitor->trace(m_eventHandlerRegistry);
205 visitor->trace(m_consoleMessageStorage); 193 visitor->trace(m_consoleMessageStorage);
206 visitor->trace(m_customElementReactionStack);
207 } 194 }
208 195
209 #if ENABLE(ASSERT) 196 #if ENABLE(ASSERT)
210 void checkFrameCountConsistency(int expectedFrameCount, Frame* frame) 197 void checkFrameCountConsistency(int expectedFrameCount, Frame* frame)
211 { 198 {
212 ASSERT(expectedFrameCount >= 0); 199 ASSERT(expectedFrameCount >= 0);
213 200
214 int actualFrameCount = 0; 201 int actualFrameCount = 0;
215 for (; frame; frame = frame->tree().traverseNext()) 202 for (; frame; frame = frame->tree().traverseNext())
216 ++actualFrameCount; 203 ++actualFrameCount;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 250
264 FrameView* rootView = page().deprecatedLocalMainFrame()->view(); 251 FrameView* rootView = page().deprecatedLocalMainFrame()->view();
265 252
266 if (!rootView) 253 if (!rootView)
267 return; 254 return;
268 255
269 rootView->setNeedsLayout(); 256 rootView->setNeedsLayout();
270 } 257 }
271 258
272 } // namespace blink 259 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698