OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 30 matching lines...) Expand all Loading... |
41 #include "platform/wtf/Vector.h" | 41 #include "platform/wtf/Vector.h" |
42 #include "public/platform/WebSize.h" | 42 #include "public/platform/WebSize.h" |
43 #include "public/platform/WebThread.h" | 43 #include "public/platform/WebThread.h" |
44 #include "public/web/WebDevToolsAgent.h" | 44 #include "public/web/WebDevToolsAgent.h" |
45 #include "web/InspectorEmulationAgent.h" | 45 #include "web/InspectorEmulationAgent.h" |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 class GraphicsLayer; | 49 class GraphicsLayer; |
50 class InspectedFrames; | 50 class InspectedFrames; |
51 class InspectorOverlayAgent; | 51 class InspectorOverlay; |
52 class InspectorResourceContainer; | 52 class InspectorResourceContainer; |
53 class InspectorResourceContentLoader; | 53 class InspectorResourceContentLoader; |
54 class InspectorTraceEvents; | 54 class InspectorTraceEvents; |
55 class LocalFrame; | 55 class LocalFrame; |
56 class WebDevToolsAgentClient; | 56 class WebDevToolsAgentClient; |
57 class WebLayerTreeView; | 57 class WebLayerTreeView; |
58 class WebLocalFrameImpl; | 58 class WebLocalFrameImpl; |
59 class WebString; | 59 class WebString; |
60 | 60 |
61 class WebDevToolsAgentImpl final | 61 class WebDevToolsAgentImpl final |
62 : public GarbageCollectedFinalized<WebDevToolsAgentImpl>, | 62 : public GarbageCollectedFinalized<WebDevToolsAgentImpl>, |
63 public WebDevToolsAgent, | 63 public WebDevToolsAgent, |
64 public InspectorEmulationAgent::Client, | 64 public InspectorEmulationAgent::Client, |
65 public InspectorTracingAgent::Client, | 65 public InspectorTracingAgent::Client, |
66 public InspectorPageAgent::Client, | 66 public InspectorPageAgent::Client, |
67 public InspectorSession::Client, | 67 public InspectorSession::Client, |
68 private WebThread::TaskObserver { | 68 private WebThread::TaskObserver { |
69 public: | 69 public: |
70 static WebDevToolsAgentImpl* Create(WebLocalFrameImpl*, | 70 static WebDevToolsAgentImpl* Create(WebLocalFrameImpl*, |
71 WebDevToolsAgentClient*); | 71 WebDevToolsAgentClient*); |
72 ~WebDevToolsAgentImpl() override; | 72 ~WebDevToolsAgentImpl() override; |
73 DECLARE_VIRTUAL_TRACE(); | 73 DECLARE_VIRTUAL_TRACE(); |
74 | 74 |
75 void WillBeDestroyed(); | 75 void WillBeDestroyed(); |
76 WebDevToolsAgentClient* Client() { return client_; } | 76 WebDevToolsAgentClient* Client() { return client_; } |
77 InspectorOverlayAgent* OverlayAgent() const { return overlay_agent_.Get(); } | 77 InspectorOverlay* Overlay() const { return overlay_.Get(); } |
78 void FlushProtocolNotifications(); | 78 void FlushProtocolNotifications(); |
79 | 79 |
80 // Instrumentation from web/ layer. | 80 // Instrumentation from web/ layer. |
81 void DidCommitLoadForLocalFrame(LocalFrame*); | 81 void DidCommitLoadForLocalFrame(LocalFrame*); |
82 void DidStartProvisionalLoad(LocalFrame*); | 82 void DidStartProvisionalLoad(LocalFrame*); |
83 bool ScreencastEnabled(); | 83 bool ScreencastEnabled(); |
84 void WillAddPageOverlay(const GraphicsLayer*); | 84 void WillAddPageOverlay(const GraphicsLayer*); |
85 void DidRemovePageOverlay(const GraphicsLayer*); | 85 void DidRemovePageOverlay(const GraphicsLayer*); |
86 void LayerTreeViewChanged(WebLayerTreeView*); | 86 void LayerTreeViewChanged(WebLayerTreeView*); |
87 void RootLayerCleared(); | 87 void RootLayerCleared(); |
(...skipping 10 matching lines...) Expand all Loading... |
98 const WebString& method, | 98 const WebString& method, |
99 const WebString& message) override; | 99 const WebString& message) override; |
100 void InspectElementAt(int session_id, const WebPoint&) override; | 100 void InspectElementAt(int session_id, const WebPoint&) override; |
101 void FailedToRequestDevTools() override; | 101 void FailedToRequestDevTools() override; |
102 WebString EvaluateInWebInspectorOverlay(const WebString& script) override; | 102 WebString EvaluateInWebInspectorOverlay(const WebString& script) override; |
103 bool CacheDisabled() override; | 103 bool CacheDisabled() override; |
104 | 104 |
105 private: | 105 private: |
106 WebDevToolsAgentImpl(WebLocalFrameImpl*, | 106 WebDevToolsAgentImpl(WebLocalFrameImpl*, |
107 WebDevToolsAgentClient*, | 107 WebDevToolsAgentClient*, |
| 108 InspectorOverlay*, |
108 bool include_view_agents); | 109 bool include_view_agents); |
109 | 110 |
110 // InspectorTracingAgent::Client implementation. | 111 // InspectorTracingAgent::Client implementation. |
111 void EnableTracing(const WTF::String& category_filter) override; | 112 void EnableTracing(const WTF::String& category_filter) override; |
112 void DisableTracing() override; | 113 void DisableTracing() override; |
113 void ShowReloadingBlanket() override; | 114 void ShowReloadingBlanket() override; |
114 void HideReloadingBlanket() override; | 115 void HideReloadingBlanket() override; |
115 | 116 |
116 // InspectorEmulationAgent::Client implementation. | 117 // InspectorEmulationAgent::Client implementation. |
117 void SetCPUThrottlingRate(double) override; | 118 void SetCPUThrottlingRate(double) override; |
118 | 119 |
119 // InspectorPageAgent::Client implementation. | 120 // InspectorPageAgent::Client implementation. |
120 void PageLayoutInvalidated(bool resized) override; | 121 void PageLayoutInvalidated(bool resized) override; |
| 122 void ConfigureOverlay(bool suspended, const String& message) override; |
121 void WaitForCreateWindow(LocalFrame*) override; | 123 void WaitForCreateWindow(LocalFrame*) override; |
122 | 124 |
123 // InspectorSession::Client implementation. | 125 // InspectorSession::Client implementation. |
124 void SendProtocolMessage(int session_id, | 126 void SendProtocolMessage(int session_id, |
125 int call_id, | 127 int call_id, |
126 const String& response, | 128 const String& response, |
127 const String& state) override; | 129 const String& state) override; |
128 | 130 |
129 // WebThread::TaskObserver implementation. | 131 // WebThread::TaskObserver implementation. |
130 void WillProcessTask() override; | 132 void WillProcessTask() override; |
(...skipping 10 matching lines...) Expand all Loading... |
141 int session_id, | 143 int session_id, |
142 std::unique_ptr<WebDevToolsAgent::MessageDescriptor>); | 144 std::unique_ptr<WebDevToolsAgent::MessageDescriptor>); |
143 | 145 |
144 bool Attached() const { return session_.Get(); } | 146 bool Attached() const { return session_.Get(); } |
145 | 147 |
146 WebDevToolsAgentClient* client_; | 148 WebDevToolsAgentClient* client_; |
147 Member<WebLocalFrameImpl> web_local_frame_impl_; | 149 Member<WebLocalFrameImpl> web_local_frame_impl_; |
148 | 150 |
149 Member<CoreProbeSink> instrumenting_agents_; | 151 Member<CoreProbeSink> instrumenting_agents_; |
150 Member<InspectorResourceContentLoader> resource_content_loader_; | 152 Member<InspectorResourceContentLoader> resource_content_loader_; |
| 153 Member<InspectorOverlay> overlay_; |
151 Member<InspectedFrames> inspected_frames_; | 154 Member<InspectedFrames> inspected_frames_; |
152 Member<InspectorResourceContainer> resource_container_; | 155 Member<InspectorResourceContainer> resource_container_; |
153 | 156 |
| 157 Member<InspectorDOMAgent> dom_agent_; |
154 Member<InspectorPageAgent> page_agent_; | 158 Member<InspectorPageAgent> page_agent_; |
155 Member<InspectorNetworkAgent> network_agent_; | 159 Member<InspectorNetworkAgent> network_agent_; |
156 Member<InspectorLayerTreeAgent> layer_tree_agent_; | 160 Member<InspectorLayerTreeAgent> layer_tree_agent_; |
157 Member<InspectorTracingAgent> tracing_agent_; | 161 Member<InspectorTracingAgent> tracing_agent_; |
158 Member<InspectorTraceEvents> trace_events_agent_; | 162 Member<InspectorTraceEvents> trace_events_agent_; |
159 Member<InspectorOverlayAgent> overlay_agent_; | |
160 | 163 |
161 Member<InspectorSession> session_; | 164 Member<InspectorSession> session_; |
162 bool include_view_agents_; | 165 bool include_view_agents_; |
163 int layer_tree_id_; | 166 int layer_tree_id_; |
164 }; | 167 }; |
165 | 168 |
166 } // namespace blink | 169 } // namespace blink |
167 | 170 |
168 #endif | 171 #endif |
OLD | NEW |