OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010-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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "web/WebDevToolsAgentImpl.h" | 31 #include "web/WebDevToolsAgentImpl.h" |
32 | 32 |
33 #include <v8-inspector.h> | 33 #include <v8-inspector.h> |
34 #include <memory> | 34 #include <memory> |
35 | 35 |
36 #include "bindings/core/v8/ScriptController.h" | 36 #include "bindings/core/v8/ScriptController.h" |
37 #include "bindings/core/v8/V8BindingForCore.h" | 37 #include "bindings/core/v8/V8BindingForCore.h" |
38 #include "core/CoreProbeSink.h" | 38 #include "core/CoreProbeSink.h" |
| 39 #include "core/exported/WebViewBase.h" |
39 #include "core/frame/FrameView.h" | 40 #include "core/frame/FrameView.h" |
40 #include "core/frame/LocalFrame.h" | 41 #include "core/frame/LocalFrame.h" |
41 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
42 #include "core/inspector/InspectedFrames.h" | 43 #include "core/inspector/InspectedFrames.h" |
43 #include "core/inspector/InspectorAnimationAgent.h" | 44 #include "core/inspector/InspectorAnimationAgent.h" |
44 #include "core/inspector/InspectorApplicationCacheAgent.h" | 45 #include "core/inspector/InspectorApplicationCacheAgent.h" |
45 #include "core/inspector/InspectorCSSAgent.h" | 46 #include "core/inspector/InspectorCSSAgent.h" |
46 #include "core/inspector/InspectorDOMAgent.h" | 47 #include "core/inspector/InspectorDOMAgent.h" |
47 #include "core/inspector/InspectorDOMDebuggerAgent.h" | 48 #include "core/inspector/InspectorDOMDebuggerAgent.h" |
48 #include "core/inspector/InspectorInputAgent.h" | 49 #include "core/inspector/InspectorInputAgent.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 #include "public/platform/WebString.h" | 83 #include "public/platform/WebString.h" |
83 #include "public/web/WebDevToolsAgentClient.h" | 84 #include "public/web/WebDevToolsAgentClient.h" |
84 #include "public/web/WebSettings.h" | 85 #include "public/web/WebSettings.h" |
85 #include "web/DevToolsEmulator.h" | 86 #include "web/DevToolsEmulator.h" |
86 #include "web/InspectorEmulationAgent.h" | 87 #include "web/InspectorEmulationAgent.h" |
87 #include "web/InspectorOverlayAgent.h" | 88 #include "web/InspectorOverlayAgent.h" |
88 #include "web/WebFrameWidgetImpl.h" | 89 #include "web/WebFrameWidgetImpl.h" |
89 #include "web/WebInputEventConversion.h" | 90 #include "web/WebInputEventConversion.h" |
90 #include "web/WebLocalFrameImpl.h" | 91 #include "web/WebLocalFrameImpl.h" |
91 #include "web/WebSettingsImpl.h" | 92 #include "web/WebSettingsImpl.h" |
92 #include "web/WebViewImpl.h" | |
93 | 93 |
94 namespace blink { | 94 namespace blink { |
95 | 95 |
96 namespace { | 96 namespace { |
97 | 97 |
98 bool IsMainFrame(WebLocalFrameImpl* frame) { | 98 bool IsMainFrame(WebLocalFrameImpl* frame) { |
99 // TODO(dgozman): sometimes view->mainFrameImpl() does return null, even | 99 // TODO(dgozman): sometimes view->mainFrameImpl() does return null, even |
100 // though |frame| is meant to be main frame. See http://crbug.com/526162. | 100 // though |frame| is meant to be main frame. See http://crbug.com/526162. |
101 return frame->ViewImpl() && !frame->Parent(); | 101 return frame->ViewImpl() && !frame->Parent(); |
102 } | 102 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 WebDevToolsAgentClient* client) { | 234 WebDevToolsAgentClient* client) { |
235 if (!IsMainFrame(frame)) { | 235 if (!IsMainFrame(frame)) { |
236 WebDevToolsAgentImpl* agent = | 236 WebDevToolsAgentImpl* agent = |
237 new WebDevToolsAgentImpl(frame, client, false); | 237 new WebDevToolsAgentImpl(frame, client, false); |
238 if (frame->FrameWidget()) | 238 if (frame->FrameWidget()) |
239 agent->LayerTreeViewChanged( | 239 agent->LayerTreeViewChanged( |
240 ToWebFrameWidgetImpl(frame->FrameWidget())->LayerTreeView()); | 240 ToWebFrameWidgetImpl(frame->FrameWidget())->LayerTreeView()); |
241 return agent; | 241 return agent; |
242 } | 242 } |
243 | 243 |
244 WebViewImpl* view = frame->ViewImpl(); | 244 WebViewBase* view = frame->ViewImpl(); |
245 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, true); | 245 WebDevToolsAgentImpl* agent = new WebDevToolsAgentImpl(frame, client, true); |
246 agent->LayerTreeViewChanged(view->LayerTreeView()); | 246 agent->LayerTreeViewChanged(view->LayerTreeView()); |
247 return agent; | 247 return agent; |
248 } | 248 } |
249 | 249 |
250 WebDevToolsAgentImpl::WebDevToolsAgentImpl( | 250 WebDevToolsAgentImpl::WebDevToolsAgentImpl( |
251 WebLocalFrameImpl* web_local_frame_impl, | 251 WebLocalFrameImpl* web_local_frame_impl, |
252 WebDevToolsAgentClient* client, | 252 WebDevToolsAgentClient* client, |
253 bool include_view_agents) | 253 bool include_view_agents) |
254 : client_(client), | 254 : client_(client), |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 } | 632 } |
633 | 633 |
634 bool WebDevToolsAgent::ShouldInterruptForMethod(const WebString& method) { | 634 bool WebDevToolsAgent::ShouldInterruptForMethod(const WebString& method) { |
635 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || | 635 return method == "Debugger.pause" || method == "Debugger.setBreakpoint" || |
636 method == "Debugger.setBreakpointByUrl" || | 636 method == "Debugger.setBreakpointByUrl" || |
637 method == "Debugger.removeBreakpoint" || | 637 method == "Debugger.removeBreakpoint" || |
638 method == "Debugger.setBreakpointsActive"; | 638 method == "Debugger.setBreakpointsActive"; |
639 } | 639 } |
640 | 640 |
641 } // namespace blink | 641 } // namespace blink |
OLD | NEW |