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

Side by Side Diff: chrome/renderer/devtools_agent.cc

Issue 7322008: Enable clear cache/cookies support in developer tools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/devtools_agent.h" 5 #include "chrome/renderer/devtools_agent.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* 130 WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop*
131 DevToolsAgent::createClientMessageLoop() { 131 DevToolsAgent::createClientMessageLoop() {
132 return new WebKitClientMessageLoopImpl(); 132 return new WebKitClientMessageLoopImpl();
133 } 133 }
134 134
135 bool DevToolsAgent::exposeV8DebuggerProtocol() { 135 bool DevToolsAgent::exposeV8DebuggerProtocol() {
136 return expose_v8_debugger_protocol_; 136 return expose_v8_debugger_protocol_;
137 } 137 }
138 138
139 void DevToolsAgent::clearBrowserCache() {
140 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id()));
141 }
142
143 void DevToolsAgent::clearBrowserCookies() {
144 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id()));
145 }
139 146
140 // static 147 // static
141 DevToolsAgent* DevToolsAgent::FromHostId(int host_id) { 148 DevToolsAgent* DevToolsAgent::FromHostId(int host_id) {
142 std::map<int, DevToolsAgent*>::iterator it = 149 std::map<int, DevToolsAgent*>::iterator it =
143 agent_for_routing_id_.find(host_id); 150 agent_for_routing_id_.find(host_id);
144 if (it != agent_for_routing_id_.end()) { 151 if (it != agent_for_routing_id_.end()) {
145 return it->second; 152 return it->second;
146 } 153 }
147 return NULL; 154 return NULL;
148 } 155 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void DevToolsAgent::OnSetupDevToolsClient() { 204 void DevToolsAgent::OnSetupDevToolsClient() {
198 new DevToolsClient(render_view()); 205 new DevToolsClient(render_view());
199 } 206 }
200 207
201 WebDevToolsAgent* DevToolsAgent::GetWebAgent() { 208 WebDevToolsAgent* DevToolsAgent::GetWebAgent() {
202 WebView* web_view = render_view()->webview(); 209 WebView* web_view = render_view()->webview();
203 if (!web_view) 210 if (!web_view)
204 return NULL; 211 return NULL;
205 return web_view->devToolsAgent(); 212 return web_view->devToolsAgent();
206 } 213 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698