OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 24 matching lines...) Expand all Loading... |
35 #include "core/dom/NodeTraversal.h" | 35 #include "core/dom/NodeTraversal.h" |
36 #include "core/dom/shadow/ShadowRoot.h" | 36 #include "core/dom/shadow/ShadowRoot.h" |
37 #include "core/frame/FrameConsole.h" | 37 #include "core/frame/FrameConsole.h" |
38 #include "core/inspector/InjectedScriptHost.h" | 38 #include "core/inspector/InjectedScriptHost.h" |
39 #include "core/inspector/InjectedScriptManager.h" | 39 #include "core/inspector/InjectedScriptManager.h" |
40 #include "core/inspector/InspectorDOMAgent.h" | 40 #include "core/inspector/InspectorDOMAgent.h" |
41 #include "core/page/Page.h" | 41 #include "core/page/Page.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 PageConsoleAgent::PageConsoleAgent(InjectedScriptManager* injectedScriptManager,
InspectorDOMAgent* domAgent, InspectorTimelineAgent* timelineAgent, InspectorTr
acingAgent* tracingAgent, Page* page) | 45 PageConsoleAgent::PageConsoleAgent(InjectedScriptManager* injectedScriptManager,
InspectorDOMAgent* domAgent, InspectorTimelineAgent* timelineAgent, Page* page) |
46 : InspectorConsoleAgent(timelineAgent, tracingAgent, injectedScriptManager) | 46 : InspectorConsoleAgent(timelineAgent, injectedScriptManager) |
47 , m_inspectorDOMAgent(domAgent) | 47 , m_inspectorDOMAgent(domAgent) |
48 , m_page(page) | 48 , m_page(page) |
49 { | 49 { |
50 } | 50 } |
51 | 51 |
52 PageConsoleAgent::~PageConsoleAgent() | 52 PageConsoleAgent::~PageConsoleAgent() |
53 { | 53 { |
54 #if !ENABLE(OILPAN) | 54 #if !ENABLE(OILPAN) |
55 m_inspectorDOMAgent = nullptr; | 55 m_inspectorDOMAgent = nullptr; |
56 #endif | 56 #endif |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 Node& ancestor = NodeTraversal::highestAncestorOrSelf(*node); | 96 Node& ancestor = NodeTraversal::highestAncestorOrSelf(*node); |
97 if (!ancestor.isShadowRoot() || toShadowRoot(ancestor).type() == ShadowR
oot::AuthorShadowRoot) | 97 if (!ancestor.isShadowRoot() || toShadowRoot(ancestor).type() == ShadowR
oot::AuthorShadowRoot) |
98 break; | 98 break; |
99 // User agent shadow root, keep climbing up. | 99 // User agent shadow root, keep climbing up. |
100 node = toShadowRoot(ancestor).host(); | 100 node = toShadowRoot(ancestor).host(); |
101 } | 101 } |
102 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableNode(node))); | 102 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableNode(node))); |
103 } | 103 } |
104 | 104 |
105 } // namespace blink | 105 } // namespace blink |
OLD | NEW |