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

Side by Side Diff: android_webview/native/aw_dev_tools_server.cc

Issue 680943002: [DevTools] Migrate DevToolsHttpHandlerDelegate::CreateSocketForTethering to StreamSocket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "android_webview/native/aw_dev_tools_server.h" 5 #include "android_webview/native/aw_dev_tools_server.h"
6 6
7 #include "android_webview/native/aw_contents.h" 7 #include "android_webview/native/aw_contents.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 21 matching lines...) Expand all
32 const char kSocketNameFormat[] = "webview_devtools_remote_%d"; 32 const char kSocketNameFormat[] = "webview_devtools_remote_%d";
33 33
34 // Delegate implementation for the devtools http handler for WebView. A new 34 // Delegate implementation for the devtools http handler for WebView. A new
35 // instance of this gets created each time web debugging is enabled. 35 // instance of this gets created each time web debugging is enabled.
36 class AwDevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate { 36 class AwDevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate {
37 public: 37 public:
38 AwDevToolsServerDelegate() {} 38 AwDevToolsServerDelegate() {}
39 virtual ~AwDevToolsServerDelegate() {} 39 virtual ~AwDevToolsServerDelegate() {}
40 40
41 // DevToolsHttpProtocolHandler::Delegate overrides. 41 // DevToolsHttpProtocolHandler::Delegate overrides.
42 virtual std::string GetDiscoveryPageHTML() override; 42 std::string GetDiscoveryPageHTML() override;
43 43
44 virtual bool BundlesFrontendResources() override { 44 bool BundlesFrontendResources() override {
45 return false; 45 return false;
46 } 46 }
47 47
48 virtual base::FilePath GetDebugFrontendDir() override { 48 base::FilePath GetDebugFrontendDir() override {
49 return base::FilePath(); 49 return base::FilePath();
50 } 50 }
51 51
52 virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering( 52 scoped_ptr<net::ServerSocket>
53 net::StreamListenSocket::Delegate* delegate, 53 CreateSocketForTethering(std::string* name) override {
54 std::string* name) override { 54 return scoped_ptr<net::ServerSocket>();
55 return scoped_ptr<net::StreamListenSocket>();
56 } 55 }
57 56
58 private: 57 private:
59 DISALLOW_COPY_AND_ASSIGN(AwDevToolsServerDelegate); 58 DISALLOW_COPY_AND_ASSIGN(AwDevToolsServerDelegate);
60 }; 59 };
61 60
62 61
63 std::string AwDevToolsServerDelegate::GetDiscoveryPageHTML() { 62 std::string AwDevToolsServerDelegate::GetDiscoveryPageHTML() {
64 const char html[] = 63 const char html[] =
65 "<html>" 64 "<html>"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 AwDevToolsServer* devtools_server = 148 AwDevToolsServer* devtools_server =
150 reinterpret_cast<AwDevToolsServer*>(server); 149 reinterpret_cast<AwDevToolsServer*>(server);
151 if (enabled) { 150 if (enabled) {
152 devtools_server->Start(); 151 devtools_server->Start();
153 } else { 152 } else {
154 devtools_server->Stop(); 153 devtools_server->Stop();
155 } 154 }
156 } 155 }
157 156
158 } // namespace android_webview 157 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698