OLD | NEW |
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_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 return shell_browser_main_parts_->net_log(); | 341 return shell_browser_main_parts_->net_log(); |
342 } | 342 } |
343 | 343 |
344 bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect( | 344 bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect( |
345 ResourceContext* resource_context, | 345 ResourceContext* resource_context, |
346 const GURL& current_url, | 346 const GURL& current_url, |
347 const GURL& new_url) { | 347 const GURL& new_url) { |
348 return g_swap_processes_for_redirect; | 348 return g_swap_processes_for_redirect; |
349 } | 349 } |
350 | 350 |
| 351 DevToolsManagerDelegate* |
| 352 ShellContentBrowserClient::GetDevToolsManagerDelegate() { |
| 353 return new ShellDevToolsManagerDelegate(browser_context()); |
| 354 } |
| 355 |
351 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 356 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
352 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 357 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
353 const CommandLine& command_line, | 358 const CommandLine& command_line, |
354 int child_process_id, | 359 int child_process_id, |
355 std::vector<FileDescriptorInfo>* mappings) { | 360 std::vector<FileDescriptorInfo>* mappings) { |
356 #if defined(OS_ANDROID) | 361 #if defined(OS_ANDROID) |
357 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ; | 362 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ; |
358 base::FilePath pak_file; | 363 base::FilePath pak_file; |
359 bool r = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file); | 364 bool r = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_file); |
360 CHECK(r); | 365 CHECK(r); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 ShellBrowserContext* | 428 ShellBrowserContext* |
424 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 429 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
425 BrowserContext* content_browser_context) { | 430 BrowserContext* content_browser_context) { |
426 if (content_browser_context == browser_context()) | 431 if (content_browser_context == browser_context()) |
427 return browser_context(); | 432 return browser_context(); |
428 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 433 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
429 return off_the_record_browser_context(); | 434 return off_the_record_browser_context(); |
430 } | 435 } |
431 | 436 |
432 } // namespace content | 437 } // namespace content |
OLD | NEW |