OLD | NEW |
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 "extensions/shell/browser/shell_content_browser_client.h" | 5 #include "extensions/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "components/guest_view/browser/guest_view_message_filter.h" | 8 #include "components/guest_view/browser/guest_view_message_filter.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 std::vector<std::string>* additional_allowed_schemes) { | 249 std::vector<std::string>* additional_allowed_schemes) { |
250 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | 250 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( |
251 additional_allowed_schemes); | 251 additional_allowed_schemes); |
252 additional_allowed_schemes->push_back(kExtensionScheme); | 252 additional_allowed_schemes->push_back(kExtensionScheme); |
253 } | 253 } |
254 | 254 |
255 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 255 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
256 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 256 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
257 const base::CommandLine& command_line, | 257 const base::CommandLine& command_line, |
258 int child_process_id, | 258 int child_process_id, |
259 content::FileDescriptorInfo* mappings) { | 259 content::FileDescriptorInfo* mappings |
| 260 #if defined(OS_ANDROID) |
| 261 , |
| 262 std::map<int, base::MemoryMappedFile::Region>* regions |
| 263 #endif |
| 264 ) { |
260 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) | 265 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
261 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { | 266 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { |
262 int v8_natives_fd = -1; | 267 int v8_natives_fd = -1; |
263 int v8_snapshot_fd = -1; | 268 int v8_snapshot_fd = -1; |
264 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, | 269 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, |
265 &v8_snapshot_fd)) { | 270 &v8_snapshot_fd)) { |
266 v8_natives_fd_.reset(v8_natives_fd); | 271 v8_natives_fd_.reset(v8_natives_fd); |
267 v8_snapshot_fd_.reset(v8_snapshot_fd); | 272 v8_snapshot_fd_.reset(v8_snapshot_fd); |
268 } | 273 } |
269 } | 274 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 310 |
306 const Extension* ShellContentBrowserClient::GetExtension( | 311 const Extension* ShellContentBrowserClient::GetExtension( |
307 content::SiteInstance* site_instance) { | 312 content::SiteInstance* site_instance) { |
308 ExtensionRegistry* registry = | 313 ExtensionRegistry* registry = |
309 ExtensionRegistry::Get(site_instance->GetBrowserContext()); | 314 ExtensionRegistry::Get(site_instance->GetBrowserContext()); |
310 return registry->enabled_extensions().GetExtensionOrAppByURL( | 315 return registry->enabled_extensions().GetExtensionOrAppByURL( |
311 site_instance->GetSiteURL()); | 316 site_instance->GetSiteURL()); |
312 } | 317 } |
313 | 318 |
314 } // namespace extensions | 319 } // namespace extensions |
OLD | NEW |