OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/devtools/devtools_agent.h" | 5 #include "content/renderer/devtools/devtools_agent.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 134 } |
135 | 135 |
136 void DevToolsAgent::clearBrowserCache() { | 136 void DevToolsAgent::clearBrowserCache() { |
137 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id())); | 137 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id())); |
138 } | 138 } |
139 | 139 |
140 void DevToolsAgent::clearBrowserCookies() { | 140 void DevToolsAgent::clearBrowserCookies() { |
141 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id())); | 141 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id())); |
142 } | 142 } |
143 | 143 |
| 144 void DevToolsAgent::setBlockedDomains( |
| 145 const blink::WebVector<blink::WebString>& blocked_domains) { |
| 146 std::vector<std::string> list; |
| 147 for (size_t i = 0; i < blocked_domains.size(); ++i) { |
| 148 list.push_back(blocked_domains[i].utf8()); |
| 149 } |
| 150 Send(new DevToolsHostMsg_SetBlockedDomains(routing_id(), list)); |
| 151 } |
| 152 |
144 void DevToolsAgent::resetTraceEventCallback() | 153 void DevToolsAgent::resetTraceEventCallback() |
145 { | 154 { |
146 TraceLog::GetInstance()->SetEventCallbackDisabled(); | 155 TraceLog::GetInstance()->SetEventCallbackDisabled(); |
147 base::subtle::NoBarrier_Store(&event_callback_, 0); | 156 base::subtle::NoBarrier_Store(&event_callback_, 0); |
148 } | 157 } |
149 | 158 |
150 void DevToolsAgent::setTraceEventCallback(const WebString& category_filter, | 159 void DevToolsAgent::setTraceEventCallback(const WebString& category_filter, |
151 TraceEventCallback cb) { | 160 TraceEventCallback cb) { |
152 TraceLog* trace_log = TraceLog::GetInstance(); | 161 TraceLog* trace_log = TraceLog::GetInstance(); |
153 base::subtle::NoBarrier_Store(&event_callback_, | 162 base::subtle::NoBarrier_Store(&event_callback_, |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 if (!web_view) | 355 if (!web_view) |
347 return NULL; | 356 return NULL; |
348 return web_view->devToolsAgent(); | 357 return web_view->devToolsAgent(); |
349 } | 358 } |
350 | 359 |
351 bool DevToolsAgent::IsAttached() { | 360 bool DevToolsAgent::IsAttached() { |
352 return is_attached_; | 361 return is_attached_; |
353 } | 362 } |
354 | 363 |
355 } // namespace content | 364 } // namespace content |
OLD | NEW |