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

Side by Side Diff: chromecast/shell/browser/cast_content_browser_client.cc

Issue 560323005: [DevTools] Move target-related methods from DevToolsHttpHandlerDelegate to DevToolsManagerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 "chromecast/shell/browser/cast_content_browser_client.h" 5 #include "chromecast/shell/browser/cast_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chromecast/common/cast_paths.h" 10 #include "chromecast/common/cast_paths.h"
11 #include "chromecast/common/global_descriptors.h" 11 #include "chromecast/common/global_descriptors.h"
12 #include "chromecast/shell/browser/cast_browser_context.h" 12 #include "chromecast/shell/browser/cast_browser_context.h"
13 #include "chromecast/shell/browser/cast_browser_main_parts.h" 13 #include "chromecast/shell/browser/cast_browser_main_parts.h"
14 #include "chromecast/shell/browser/cast_browser_process.h" 14 #include "chromecast/shell/browser/cast_browser_process.h"
15 #include "chromecast/shell/browser/devtools/cast_dev_tools_delegate.h"
15 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h" 16 #include "chromecast/shell/browser/geolocation/cast_access_token_store.h"
16 #include "chromecast/shell/browser/url_request_context_factory.h" 17 #include "chromecast/shell/browser/url_request_context_factory.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/certificate_request_result_type.h" 19 #include "content/public/browser/certificate_request_result_type.h"
19 #include "content/public/browser/file_descriptor_info.h" 20 #include "content/public/browser/file_descriptor_info.h"
20 #include "content/public/browser/render_process_host.h" 21 #include "content/public/browser/render_process_host.h"
21 #include "content/public/common/content_descriptors.h" 22 #include "content/public/common/content_descriptors.h"
22 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
23 #include "content/public/common/url_constants.h" 24 #include "content/public/common/url_constants.h"
24 #include "content/public/common/web_preferences.h" 25 #include "content/public/common/web_preferences.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 bool user_gesture, 143 bool user_gesture,
143 bool opener_suppressed, 144 bool opener_suppressed,
144 content::ResourceContext* context, 145 content::ResourceContext* context,
145 int render_process_id, 146 int render_process_id,
146 int opener_id, 147 int opener_id,
147 bool* no_javascript_access) { 148 bool* no_javascript_access) {
148 *no_javascript_access = true; 149 *no_javascript_access = true;
149 return false; 150 return false;
150 } 151 }
151 152
153 content::DevToolsManagerDelegate*
154 CastContentBrowserClient::GetDevToolsManagerDelegate() {
155 return new CastDevToolsManagerDelegate();
156 }
157
152 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 158 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
153 const base::CommandLine& command_line, 159 const base::CommandLine& command_line,
154 int child_process_id, 160 int child_process_id,
155 std::vector<content::FileDescriptorInfo>* mappings) { 161 std::vector<content::FileDescriptorInfo>* mappings) {
156 #if defined(OS_ANDROID) 162 #if defined(OS_ANDROID)
157 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ; 163 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
158 base::FilePath pak_file; 164 base::FilePath pak_file;
159 CHECK(PathService::Get(FILE_CAST_PAK, &pak_file)); 165 CHECK(PathService::Get(FILE_CAST_PAK, &pak_file));
160 base::File pak_with_flags(pak_file, flags); 166 base::File pak_with_flags(pak_file, flags);
161 if (!pak_with_flags.IsValid()) { 167 if (!pak_with_flags.IsValid()) {
162 NOTREACHED() << "Failed to open file when creating renderer process: " 168 NOTREACHED() << "Failed to open file when creating renderer process: "
163 << "cast_shell.pak"; 169 << "cast_shell.pak";
164 } 170 }
165 mappings->push_back(content::FileDescriptorInfo( 171 mappings->push_back(content::FileDescriptorInfo(
166 kAndroidPakDescriptor, 172 kAndroidPakDescriptor,
167 base::FileDescriptor(base::File(pak_file, flags)))); 173 base::FileDescriptor(base::File(pak_file, flags))));
168 #endif // defined(OS_ANDROID) 174 #endif // defined(OS_ANDROID)
169 } 175 }
170 176
171 } // namespace shell 177 } // namespace shell
172 } // namespace chromecast 178 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/shell/browser/cast_content_browser_client.h ('k') | chromecast/shell/browser/devtools/cast_dev_tools_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698