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

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

Issue 2755973003: DevTools: android shouldn't depend on devtools frontend (Closed)
Patch Set: fix Created 3 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
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_manager_delegate.h" 5 #include "content/shell/browser/shell_devtools_manager_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/atomicops.h" 11 #include "base/atomicops.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "content/public/browser/browser_context.h" 21 #include "content/public/browser/browser_context.h"
22 #include "content/public/browser/devtools_agent_host.h" 22 #include "content/public/browser/devtools_agent_host.h"
23 #include "content/public/browser/devtools_frontend_host.h"
24 #include "content/public/browser/devtools_socket_factory.h" 23 #include "content/public/browser/devtools_socket_factory.h"
25 #include "content/public/browser/favicon_status.h" 24 #include "content/public/browser/favicon_status.h"
26 #include "content/public/browser/navigation_entry.h" 25 #include "content/public/browser/navigation_entry.h"
27 #include "content/public/browser/render_view_host.h" 26 #include "content/public/browser/render_view_host.h"
28 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
29 #include "content/public/common/content_switches.h" 28 #include "content/public/common/content_switches.h"
30 #include "content/public/common/url_constants.h" 29 #include "content/public/common/url_constants.h"
31 #include "content/public/common/user_agent.h" 30 #include "content/public/common/user_agent.h"
32 #include "content/shell/browser/shell.h" 31 #include "content/shell/browser/shell.h"
33 #include "content/shell/common/shell_content_client.h" 32 #include "content/shell/common/shell_content_client.h"
34 #include "content/shell/grit/shell_resources.h" 33 #include "content/shell/grit/shell_resources.h"
35 #include "net/base/net_errors.h" 34 #include "net/base/net_errors.h"
36 #include "net/log/net_log_source.h" 35 #include "net/log/net_log_source.h"
37 #include "net/socket/tcp_server_socket.h" 36 #include "net/socket/tcp_server_socket.h"
38 #include "ui/base/resource/resource_bundle.h" 37 #include "ui/base/resource/resource_bundle.h"
39 38
39 #if !defined(OS_ANDROID)
40 #include "content/public/browser/devtools_frontend_host.h"
41 #endif
42
40 #if defined(OS_ANDROID) 43 #if defined(OS_ANDROID)
41 #include "content/public/browser/android/devtools_auth.h" 44 #include "content/public/browser/android/devtools_auth.h"
42 #include "net/socket/unix_domain_server_socket_posix.h" 45 #include "net/socket/unix_domain_server_socket_posix.h"
43 #endif 46 #endif
44 47
45 namespace content { 48 namespace content {
46 49
47 namespace { 50 namespace {
48 51
49 #if defined(OS_ANDROID) 52 #if defined(OS_ANDROID)
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 #if defined(OS_ANDROID) 200 #if defined(OS_ANDROID)
198 return std::string(); 201 return std::string();
199 #else 202 #else
200 return ResourceBundle::GetSharedInstance().GetRawDataResource( 203 return ResourceBundle::GetSharedInstance().GetRawDataResource(
201 IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string(); 204 IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE).as_string();
202 #endif 205 #endif
203 } 206 }
204 207
205 std::string ShellDevToolsManagerDelegate::GetFrontendResource( 208 std::string ShellDevToolsManagerDelegate::GetFrontendResource(
206 const std::string& path) { 209 const std::string& path) {
210 #if defined(OS_ANDROID)
211 return std::string();
212 #else
207 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); 213 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
214 #endif
208 } 215 }
209 216
210 } // namespace content 217 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_devtools_frontend.cc ('k') | headless/lib/browser/headless_devtools.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698