| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
| 13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/strings/pattern.h" | 16 #include "base/strings/pattern.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "content/public/browser/client_certificate_delegate.h" | 19 #include "content/public/browser/client_certificate_delegate.h" |
| 20 #include "content/public/browser/geolocation_delegate.h" |
| 20 #include "content/public/browser/page_navigator.h" | 21 #include "content/public/browser/page_navigator.h" |
| 21 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" |
| 22 #include "content/public/browser/resource_dispatcher_host.h" | 23 #include "content/public/browser/resource_dispatcher_host.h" |
| 23 #include "content/public/browser/storage_partition.h" | 24 #include "content/public/browser/storage_partition.h" |
| 24 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
| 25 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
| 26 #include "content/public/common/web_preferences.h" | 27 #include "content/public/common/web_preferences.h" |
| 27 #include "content/public/test/test_mojo_app.h" | 28 #include "content/public/test/test_mojo_app.h" |
| 28 #include "content/shell/browser/shell.h" | 29 #include "content/shell/browser/shell.h" |
| 29 #include "content/shell/browser/shell_access_token_store.h" | 30 #include "content/shell/browser/shell_access_token_store.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 if (!crash_handler) | 113 if (!crash_handler) |
| 113 crash_handler = CreateCrashHandlerHost(process_type); | 114 crash_handler = CreateCrashHandlerHost(process_type); |
| 114 return crash_handler->GetDeathSignalSocket(); | 115 return crash_handler->GetDeathSignalSocket(); |
| 115 } | 116 } |
| 116 | 117 |
| 117 return -1; | 118 return -1; |
| 118 } | 119 } |
| 119 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 120 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 120 | 121 |
| 121 // A provider of services for Geolocation. | 122 // A provider of services for Geolocation. |
| 122 class ShellGeolocationDelegate : public content::GeolocationProvider::Delegate { | 123 class ShellGeolocationDelegate : public content::GeolocationDelegate { |
| 123 public: | 124 public: |
| 124 explicit ShellGeolocationDelegate(ShellBrowserContext* context) | 125 explicit ShellGeolocationDelegate(ShellBrowserContext* context) |
| 125 : context_(context) {} | 126 : context_(context) {} |
| 126 | 127 |
| 127 AccessTokenStore* CreateAccessTokenStore() final { | 128 AccessTokenStore* CreateAccessTokenStore() final { |
| 128 return new ShellAccessTokenStore(context_); | 129 return new ShellAccessTokenStore(context_); |
| 129 } | 130 } |
| 130 | 131 |
| 131 private: | 132 private: |
| 132 ShellBrowserContext* context_; | 133 ShellBrowserContext* context_; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 363 |
| 363 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 364 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
| 364 return shell_browser_main_parts_->browser_context(); | 365 return shell_browser_main_parts_->browser_context(); |
| 365 } | 366 } |
| 366 | 367 |
| 367 ShellBrowserContext* | 368 ShellBrowserContext* |
| 368 ShellContentBrowserClient::off_the_record_browser_context() { | 369 ShellContentBrowserClient::off_the_record_browser_context() { |
| 369 return shell_browser_main_parts_->off_the_record_browser_context(); | 370 return shell_browser_main_parts_->off_the_record_browser_context(); |
| 370 } | 371 } |
| 371 | 372 |
| 372 GeolocationProvider::Delegate* | 373 GeolocationDelegate* ShellContentBrowserClient::CreateGeolocationDelegate() { |
| 373 ShellContentBrowserClient::CreateGeolocationDelegate() { | |
| 374 return new ShellGeolocationDelegate(browser_context()); | 374 return new ShellGeolocationDelegate(browser_context()); |
| 375 } | 375 } |
| 376 | 376 |
| 377 } // namespace content | 377 } // namespace content |
| OLD | NEW |