Chromium Code Reviews| 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" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; | 111 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; |
| 112 if (!crash_handler) | 112 if (!crash_handler) |
| 113 crash_handler = CreateCrashHandlerHost(process_type); | 113 crash_handler = CreateCrashHandlerHost(process_type); |
| 114 return crash_handler->GetDeathSignalSocket(); | 114 return crash_handler->GetDeathSignalSocket(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 return -1; | 117 return -1; |
| 118 } | 118 } |
| 119 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 119 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 120 | 120 |
| 121 // A provider of services for Geolocation. | |
| 122 class ShellGeolocationDelegate : public content::GeolocationProvider::Delegate { | |
|
Michael van Ouwerkerk
2016/06/28 11:17:08
nit: DISALLOW_COPY_AND_ASSIGN
mcasas
2016/06/28 16:51:26
Done.
| |
| 123 public: | |
| 124 explicit ShellGeolocationDelegate(ShellBrowserContext* context) | |
| 125 : context_(context) {} | |
| 126 | |
| 127 AccessTokenStore* CreateAccessTokenStore() final { | |
| 128 return new ShellAccessTokenStore(context_); | |
| 129 } | |
| 130 | |
| 131 private: | |
| 132 ShellBrowserContext* context_; | |
| 133 }; | |
| 134 | |
| 121 } // namespace | 135 } // namespace |
| 122 | 136 |
| 123 ShellContentBrowserClient* ShellContentBrowserClient::Get() { | 137 ShellContentBrowserClient* ShellContentBrowserClient::Get() { |
| 124 return g_browser_client; | 138 return g_browser_client; |
| 125 } | 139 } |
| 126 | 140 |
| 127 void ShellContentBrowserClient::SetSwapProcessesForRedirect(bool swap) { | 141 void ShellContentBrowserClient::SetSwapProcessesForRedirect(bool swap) { |
| 128 g_swap_processes_for_redirect = swap; | 142 g_swap_processes_for_redirect = swap; |
| 129 } | 143 } |
| 130 | 144 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 346 | 360 |
| 347 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 361 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
| 348 return shell_browser_main_parts_->browser_context(); | 362 return shell_browser_main_parts_->browser_context(); |
| 349 } | 363 } |
| 350 | 364 |
| 351 ShellBrowserContext* | 365 ShellBrowserContext* |
| 352 ShellContentBrowserClient::off_the_record_browser_context() { | 366 ShellContentBrowserClient::off_the_record_browser_context() { |
| 353 return shell_browser_main_parts_->off_the_record_browser_context(); | 367 return shell_browser_main_parts_->off_the_record_browser_context(); |
| 354 } | 368 } |
| 355 | 369 |
| 356 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() { | 370 GeolocationProvider::Delegate* |
| 357 return new ShellAccessTokenStore(browser_context()); | 371 ShellContentBrowserClient::CreateGeolocationDelegate() { |
| 372 return new ShellGeolocationDelegate(browser_context()); | |
| 358 } | 373 } |
| 359 | 374 |
| 360 } // namespace content | 375 } // namespace content |
| OLD | NEW |