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

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 898593002: DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/frame/FrameConsole.h" 44 #include "core/frame/FrameConsole.h"
45 #include "core/frame/FrameDestructionObserver.h" 45 #include "core/frame/FrameDestructionObserver.h"
46 #include "core/frame/FrameHost.h" 46 #include "core/frame/FrameHost.h"
47 #include "core/frame/FrameView.h" 47 #include "core/frame/FrameView.h"
48 #include "core/frame/LocalDOMWindow.h" 48 #include "core/frame/LocalDOMWindow.h"
49 #include "core/frame/Settings.h" 49 #include "core/frame/Settings.h"
50 #include "core/html/HTMLFrameElementBase.h" 50 #include "core/html/HTMLFrameElementBase.h"
51 #include "core/html/HTMLPlugInElement.h" 51 #include "core/html/HTMLPlugInElement.h"
52 #include "core/inspector/ConsoleMessageStorage.h" 52 #include "core/inspector/ConsoleMessageStorage.h"
53 #include "core/inspector/InspectorInstrumentation.h" 53 #include "core/inspector/InspectorInstrumentation.h"
54 #include "core/inspector/InstrumentingAgents.h"
54 #include "core/loader/FrameLoaderClient.h" 55 #include "core/loader/FrameLoaderClient.h"
55 #include "core/page/Chrome.h" 56 #include "core/page/Chrome.h"
56 #include "core/page/EventHandler.h" 57 #include "core/page/EventHandler.h"
57 #include "core/page/FocusController.h" 58 #include "core/page/FocusController.h"
58 #include "core/page/Page.h" 59 #include "core/page/Page.h"
59 #include "core/page/scrolling/ScrollingCoordinator.h" 60 #include "core/page/scrolling/ScrollingCoordinator.h"
60 #include "core/paint/TransformRecorder.h" 61 #include "core/paint/TransformRecorder.h"
61 #include "core/rendering/HitTestResult.h" 62 #include "core/rendering/HitTestResult.h"
62 #include "core/rendering/RenderLayer.h" 63 #include "core/rendering/RenderLayer.h"
63 #include "core/rendering/RenderView.h" 64 #include "core/rendering/RenderView.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // frameDestroyed() notifications aren't needed. 214 // frameDestroyed() notifications aren't needed.
214 setDOMWindow(nullptr); 215 setDOMWindow(nullptr);
215 216
216 for (const auto& frameDestructionObserver : m_destructionObservers) 217 for (const auto& frameDestructionObserver : m_destructionObservers)
217 frameDestructionObserver->frameDestroyed(); 218 frameDestructionObserver->frameDestroyed();
218 #endif 219 #endif
219 } 220 }
220 221
221 void LocalFrame::trace(Visitor* visitor) 222 void LocalFrame::trace(Visitor* visitor)
222 { 223 {
224 visitor->trace(m_instrumentingAgents);
yurys 2015/02/03 06:44:00 Should be guarded with the macro below.
pfeldman 2015/02/03 07:09:16 I think instrumenting agents is already oilpan-all
223 #if ENABLE(OILPAN) 225 #if ENABLE(OILPAN)
224 visitor->trace(m_destructionObservers); 226 visitor->trace(m_destructionObservers);
225 visitor->trace(m_loader); 227 visitor->trace(m_loader);
226 visitor->trace(m_navigationScheduler); 228 visitor->trace(m_navigationScheduler);
227 visitor->trace(m_view); 229 visitor->trace(m_view);
228 visitor->trace(m_domWindow); 230 visitor->trace(m_domWindow);
229 visitor->trace(m_pagePopupOwner); 231 visitor->trace(m_pagePopupOwner);
230 visitor->trace(m_script); 232 visitor->trace(m_script);
231 visitor->trace(m_editor); 233 visitor->trace(m_editor);
232 visitor->trace(m_spellChecker); 234 visitor->trace(m_spellChecker);
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 418
417 LocalFrame* LocalFrame::localFrameRoot() 419 LocalFrame* LocalFrame::localFrameRoot()
418 { 420 {
419 LocalFrame* curFrame = this; 421 LocalFrame* curFrame = this;
420 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) 422 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame())
421 curFrame = toLocalFrame(curFrame->tree().parent()); 423 curFrame = toLocalFrame(curFrame->tree().parent());
422 424
423 return curFrame; 425 return curFrame;
424 } 426 }
425 427
428 InstrumentingAgents* LocalFrame::instrumentingAgents()
429 {
430 return m_instrumentingAgents.get();
yurys 2015/02/03 06:44:00 Why not "return host()->instrumentingAgents();" ?
pfeldman 2015/02/03 07:09:16 That's because in a subsequent change, we'll have
431 }
432
433 void LocalFrame::setInstrumentingAgents(InstrumentingAgents* instrumentingAgents )
434 {
435 m_instrumentingAgents = instrumentingAgents;
436 }
437
426 bool LocalFrame::inScope(TreeScope* scope) const 438 bool LocalFrame::inScope(TreeScope* scope) const
427 { 439 {
428 ASSERT(scope); 440 ASSERT(scope);
429 Document* doc = document(); 441 Document* doc = document();
430 if (!doc) 442 if (!doc)
431 return false; 443 return false;
432 // FIXME: This check is broken in for OOPI. 444 // FIXME: This check is broken in for OOPI.
433 HTMLFrameOwnerElement* owner = doc->ownerElement(); 445 HTMLFrameOwnerElement* owner = doc->ownerElement();
434 if (!owner) 446 if (!owner)
435 return false; 447 return false;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 , m_script(ScriptController::create(this)) 819 , m_script(ScriptController::create(this))
808 , m_editor(Editor::create(*this)) 820 , m_editor(Editor::create(*this))
809 , m_spellChecker(SpellChecker::create(*this)) 821 , m_spellChecker(SpellChecker::create(*this))
810 , m_selection(FrameSelection::create(this)) 822 , m_selection(FrameSelection::create(this))
811 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) 823 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this)))
812 , m_console(FrameConsole::create(*this)) 824 , m_console(FrameConsole::create(*this))
813 , m_inputMethodController(InputMethodController::create(*this)) 825 , m_inputMethodController(InputMethodController::create(*this))
814 , m_pageZoomFactor(parentPageZoomFactor(this)) 826 , m_pageZoomFactor(parentPageZoomFactor(this))
815 , m_textZoomFactor(parentTextZoomFactor(this)) 827 , m_textZoomFactor(parentTextZoomFactor(this))
816 , m_inViewSourceMode(false) 828 , m_inViewSourceMode(false)
829 , m_instrumentingAgents(host->instrumentingAgents())
817 { 830 {
818 } 831 }
819 832
820 void LocalFrame::detachView() 833 void LocalFrame::detachView()
821 { 834 {
822 // We detach the FrameView's custom scroll bars as early as 835 // We detach the FrameView's custom scroll bars as early as
823 // possible to prevent m_doc->detach() from messing with the view 836 // possible to prevent m_doc->detach() from messing with the view
824 // such that its scroll bars won't be torn down. 837 // such that its scroll bars won't be torn down.
825 // 838 //
826 // FIXME: We should revisit this. 839 // FIXME: We should revisit this.
827 if (m_view) 840 if (m_view)
828 m_view->prepareForDetach(); 841 m_view->prepareForDetach();
829 } 842 }
830 843
831 } // namespace blink 844 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698