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

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: fixed assertion 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/LocalFrame.h ('k') | Source/core/inspector/InspectorApplicationCacheAgent.h » ('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) 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/layout/HitTestResult.h" 55 #include "core/layout/HitTestResult.h"
55 #include "core/layout/compositing/RenderLayerCompositor.h" 56 #include "core/layout/compositing/RenderLayerCompositor.h"
56 #include "core/loader/FrameLoaderClient.h" 57 #include "core/loader/FrameLoaderClient.h"
57 #include "core/page/Chrome.h" 58 #include "core/page/Chrome.h"
58 #include "core/page/EventHandler.h" 59 #include "core/page/EventHandler.h"
59 #include "core/page/FocusController.h" 60 #include "core/page/FocusController.h"
60 #include "core/page/Page.h" 61 #include "core/page/Page.h"
61 #include "core/page/scrolling/ScrollingCoordinator.h" 62 #include "core/page/scrolling/ScrollingCoordinator.h"
62 #include "core/paint/TransformRecorder.h" 63 #include "core/paint/TransformRecorder.h"
63 #include "core/rendering/RenderLayer.h" 64 #include "core/rendering/RenderLayer.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // frameDestroyed() notifications aren't needed. 215 // frameDestroyed() notifications aren't needed.
215 setDOMWindow(nullptr); 216 setDOMWindow(nullptr);
216 217
217 for (const auto& frameDestructionObserver : m_destructionObservers) 218 for (const auto& frameDestructionObserver : m_destructionObservers)
218 frameDestructionObserver->frameDestroyed(); 219 frameDestructionObserver->frameDestroyed();
219 #endif 220 #endif
220 } 221 }
221 222
222 void LocalFrame::trace(Visitor* visitor) 223 void LocalFrame::trace(Visitor* visitor)
223 { 224 {
225 visitor->trace(m_instrumentingAgents);
224 #if ENABLE(OILPAN) 226 #if ENABLE(OILPAN)
225 visitor->trace(m_destructionObservers); 227 visitor->trace(m_destructionObservers);
226 visitor->trace(m_loader); 228 visitor->trace(m_loader);
227 visitor->trace(m_navigationScheduler); 229 visitor->trace(m_navigationScheduler);
228 visitor->trace(m_view); 230 visitor->trace(m_view);
229 visitor->trace(m_domWindow); 231 visitor->trace(m_domWindow);
230 visitor->trace(m_pagePopupOwner); 232 visitor->trace(m_pagePopupOwner);
231 visitor->trace(m_script); 233 visitor->trace(m_script);
232 visitor->trace(m_editor); 234 visitor->trace(m_editor);
233 visitor->trace(m_spellChecker); 235 visitor->trace(m_spellChecker);
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 419
418 LocalFrame* LocalFrame::localFrameRoot() 420 LocalFrame* LocalFrame::localFrameRoot()
419 { 421 {
420 LocalFrame* curFrame = this; 422 LocalFrame* curFrame = this;
421 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame()) 423 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i sLocalFrame())
422 curFrame = toLocalFrame(curFrame->tree().parent()); 424 curFrame = toLocalFrame(curFrame->tree().parent());
423 425
424 return curFrame; 426 return curFrame;
425 } 427 }
426 428
429 InstrumentingAgents* LocalFrame::instrumentingAgents()
430 {
431 return m_instrumentingAgents.get();
432 }
433
434 void LocalFrame::setInstrumentingAgents(InstrumentingAgents* instrumentingAgents )
435 {
436 m_instrumentingAgents = instrumentingAgents;
437 }
438
427 bool LocalFrame::inScope(TreeScope* scope) const 439 bool LocalFrame::inScope(TreeScope* scope) const
428 { 440 {
429 ASSERT(scope); 441 ASSERT(scope);
430 Document* doc = document(); 442 Document* doc = document();
431 if (!doc) 443 if (!doc)
432 return false; 444 return false;
433 // FIXME: This check is broken in for OOPI. 445 // FIXME: This check is broken in for OOPI.
434 HTMLFrameOwnerElement* owner = doc->ownerElement(); 446 HTMLFrameOwnerElement* owner = doc->ownerElement();
435 if (!owner) 447 if (!owner)
436 return false; 448 return false;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 , m_script(ScriptController::create(this)) 820 , m_script(ScriptController::create(this))
809 , m_editor(Editor::create(*this)) 821 , m_editor(Editor::create(*this))
810 , m_spellChecker(SpellChecker::create(*this)) 822 , m_spellChecker(SpellChecker::create(*this))
811 , m_selection(FrameSelection::create(this)) 823 , m_selection(FrameSelection::create(this))
812 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) 824 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this)))
813 , m_console(FrameConsole::create(*this)) 825 , m_console(FrameConsole::create(*this))
814 , m_inputMethodController(InputMethodController::create(*this)) 826 , m_inputMethodController(InputMethodController::create(*this))
815 , m_pageZoomFactor(parentPageZoomFactor(this)) 827 , m_pageZoomFactor(parentPageZoomFactor(this))
816 , m_textZoomFactor(parentTextZoomFactor(this)) 828 , m_textZoomFactor(parentTextZoomFactor(this))
817 , m_inViewSourceMode(false) 829 , m_inViewSourceMode(false)
830 , m_instrumentingAgents(host->instrumentingAgents())
818 { 831 {
819 } 832 }
820 833
821 void LocalFrame::detachView() 834 void LocalFrame::detachView()
822 { 835 {
823 // We detach the FrameView's custom scroll bars as early as 836 // We detach the FrameView's custom scroll bars as early as
824 // possible to prevent m_doc->detach() from messing with the view 837 // possible to prevent m_doc->detach() from messing with the view
825 // such that its scroll bars won't be torn down. 838 // such that its scroll bars won't be torn down.
826 // 839 //
827 // FIXME: We should revisit this. 840 // FIXME: We should revisit this.
828 if (m_view) 841 if (m_view)
829 m_view->prepareForDetach(); 842 m_view->prepareForDetach();
830 } 843 }
831 844
832 } // namespace blink 845 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/inspector/InspectorApplicationCacheAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698