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

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

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit Created 4 years, 5 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
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 19 matching lines...) Expand all
30 30
31 #include "core/frame/FrameHost.h" 31 #include "core/frame/FrameHost.h"
32 32
33 #include "core/dom/custom/CustomElementReactionStack.h" 33 #include "core/dom/custom/CustomElementReactionStack.h"
34 #include "core/frame/EventHandlerRegistry.h" 34 #include "core/frame/EventHandlerRegistry.h"
35 #include "core/frame/FrameView.h" 35 #include "core/frame/FrameView.h"
36 #include "core/frame/PageScaleConstraints.h" 36 #include "core/frame/PageScaleConstraints.h"
37 #include "core/frame/PageScaleConstraintsSet.h" 37 #include "core/frame/PageScaleConstraintsSet.h"
38 #include "core/frame/TopControls.h" 38 #include "core/frame/TopControls.h"
39 #include "core/frame/VisualViewport.h" 39 #include "core/frame/VisualViewport.h"
40 #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(ConsoleMessageStorage::create())
63 , m_customElementReactionStack(new CustomElementReactionStack()) 61 , 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
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 EventHandlerRegistry& FrameHost::eventHandlerRegistry() 166 EventHandlerRegistry& FrameHost::eventHandlerRegistry()
169 { 167 {
170 return *m_eventHandlerRegistry; 168 return *m_eventHandlerRegistry;
171 } 169 }
172 170
173 const EventHandlerRegistry& FrameHost::eventHandlerRegistry() const 171 const EventHandlerRegistry& FrameHost::eventHandlerRegistry() const
174 { 172 {
175 return *m_eventHandlerRegistry; 173 return *m_eventHandlerRegistry;
176 } 174 }
177 175
178 ConsoleMessageStorage& FrameHost::consoleMessageStorage()
179 {
180 return *m_consoleMessageStorage;
181 }
182
183 const ConsoleMessageStorage& FrameHost::consoleMessageStorage() const
184 {
185 return *m_consoleMessageStorage;
186 }
187
188 CustomElementReactionStack& FrameHost::customElementReactionStack() 176 CustomElementReactionStack& FrameHost::customElementReactionStack()
189 { 177 {
190 return *m_customElementReactionStack; 178 return *m_customElementReactionStack;
191 } 179 }
192 180
193 const CustomElementReactionStack& FrameHost::customElementReactionStack() const 181 const CustomElementReactionStack& FrameHost::customElementReactionStack() const
194 { 182 {
195 return *m_customElementReactionStack; 183 return *m_customElementReactionStack;
196 } 184 }
197 185
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);
206 visitor->trace(m_customElementReactionStack); 193 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())
(...skipping 47 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') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698