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

Side by Side Diff: content/shell/browser/shell_devtools_delegate.cc

Issue 186883002: Move user_agent code from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm build directory Created 6 years, 9 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 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 "content/shell/browser/shell_devtools_delegate.h" 5 #include "content/shell/browser/shell_devtools_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "content/public/browser/devtools_agent_host.h" 14 #include "content/public/browser/devtools_agent_host.h"
15 #include "content/public/browser/devtools_http_handler.h" 15 #include "content/public/browser/devtools_http_handler.h"
16 #include "content/public/browser/devtools_target.h" 16 #include "content/public/browser/devtools_target.h"
17 #include "content/public/browser/favicon_status.h" 17 #include "content/public/browser/favicon_status.h"
18 #include "content/public/browser/navigation_entry.h" 18 #include "content/public/browser/navigation_entry.h"
19 #include "content/public/browser/render_view_host.h" 19 #include "content/public/browser/render_view_host.h"
20 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
21 #include "content/public/common/content_switches.h" 21 #include "content/public/common/content_switches.h"
22 #include "content/public/common/url_constants.h" 22 #include "content/public/common/url_constants.h"
23 #include "content/public/common/user_agent.h"
23 #include "content/shell/browser/shell.h" 24 #include "content/shell/browser/shell.h"
24 #include "grit/shell_resources.h" 25 #include "grit/shell_resources.h"
25 #include "net/socket/tcp_listen_socket.h" 26 #include "net/socket/tcp_listen_socket.h"
26 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
27 #include "webkit/common/user_agent/user_agent_util.h"
28 28
29 #if defined(OS_ANDROID) 29 #if defined(OS_ANDROID)
30 #include "content/public/browser/android/devtools_auth.h" 30 #include "content/public/browser/android/devtools_auth.h"
31 #include "net/socket/unix_domain_socket_posix.h" 31 #include "net/socket/unix_domain_socket_posix.h"
32 #endif 32 #endif
33 33
34 using content::DevToolsAgentHost; 34 using content::DevToolsAgentHost;
35 using content::RenderViewHost; 35 using content::RenderViewHost;
36 using content::WebContents; 36 using content::WebContents;
37 37
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 } // namespace 138 } // namespace
139 139
140 namespace content { 140 namespace content {
141 141
142 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context) 142 ShellDevToolsDelegate::ShellDevToolsDelegate(BrowserContext* browser_context)
143 : browser_context_(browser_context) { 143 : browser_context_(browser_context) {
144 std::string frontend_url; 144 std::string frontend_url;
145 #if defined(OS_ANDROID) 145 #if defined(OS_ANDROID)
146 frontend_url = base::StringPrintf(kFrontEndURL, 146 frontend_url = base::StringPrintf(kFrontEndURL, GetWebKitRevision().c_str());
147 webkit_glue::GetWebKitRevision().c_str());
148 #endif 147 #endif
149 devtools_http_handler_ = 148 devtools_http_handler_ =
150 DevToolsHttpHandler::Start(CreateSocketFactory(), frontend_url, this); 149 DevToolsHttpHandler::Start(CreateSocketFactory(), frontend_url, this);
151 } 150 }
152 151
153 ShellDevToolsDelegate::~ShellDevToolsDelegate() { 152 ShellDevToolsDelegate::~ShellDevToolsDelegate() {
154 } 153 }
155 154
156 void ShellDevToolsDelegate::Stop() { 155 void ShellDevToolsDelegate::Stop() {
157 // The call below destroys this. 156 // The call below destroys this.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 206 }
208 207
209 scoped_ptr<net::StreamListenSocket> 208 scoped_ptr<net::StreamListenSocket>
210 ShellDevToolsDelegate::CreateSocketForTethering( 209 ShellDevToolsDelegate::CreateSocketForTethering(
211 net::StreamListenSocket::Delegate* delegate, 210 net::StreamListenSocket::Delegate* delegate,
212 std::string* name) { 211 std::string* name) {
213 return scoped_ptr<net::StreamListenSocket>(); 212 return scoped_ptr<net::StreamListenSocket>();
214 } 213 }
215 214
216 } // namespace content 215 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_url_request_unittest.cc ('k') | content/shell/common/shell_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698