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

Side by Side Diff: content/browser/devtools/protocol/network_handler.cc

Issue 1039543003: [DevTools] Move network protocol handler to RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android_webview compile Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/devtools/protocol/network_handler.h" 5 #include "content/browser/devtools/protocol/network_handler.h"
6 6
7 #include "content/public/browser/content_browser_client.h" 7 #include "content/public/browser/content_browser_client.h"
8 #include "content/public/common/content_client.h" 8 #include "content/public/common/content_client.h"
9 9
10 namespace content { 10 namespace content {
11 namespace devtools { 11 namespace devtools {
12 namespace network { 12 namespace network {
13 13
14 typedef DevToolsProtocolClient::Response Response; 14 typedef DevToolsProtocolClient::Response Response;
15 15
16 NetworkHandler::NetworkHandler() : host_(nullptr) { 16 NetworkHandler::NetworkHandler() : host_(nullptr) {
17 } 17 }
18 18
19 NetworkHandler::~NetworkHandler() { 19 NetworkHandler::~NetworkHandler() {
20 } 20 }
21 21
22 void NetworkHandler::SetRenderViewHost(RenderViewHost* host) { 22 void NetworkHandler::SetRenderFrameHost(RenderFrameHost* host) {
23 host_ = host; 23 host_ = host;
24 } 24 }
25 25
26 Response NetworkHandler::ClearBrowserCache() { 26 Response NetworkHandler::ClearBrowserCache() {
27 if (host_) 27 if (host_)
28 GetContentClient()->browser()->ClearCache(host_); 28 GetContentClient()->browser()->ClearCache(host_);
29 return Response::OK(); 29 return Response::OK();
30 } 30 }
31 31
32 Response NetworkHandler::ClearBrowserCookies() { 32 Response NetworkHandler::ClearBrowserCookies() {
(...skipping 10 matching lines...) Expand all
43 Response NetworkHandler::EmulateNetworkConditions(bool offline, 43 Response NetworkHandler::EmulateNetworkConditions(bool offline,
44 double latency, 44 double latency,
45 double download_throughput, 45 double download_throughput,
46 double upload_throughput) { 46 double upload_throughput) {
47 return Response::FallThrough(); 47 return Response::FallThrough();
48 } 48 }
49 49
50 } // namespace dom 50 } // namespace dom
51 } // namespace devtools 51 } // namespace devtools
52 } // namespace content 52 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/protocol/network_handler.h ('k') | content/browser/devtools/render_frame_devtools_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698