| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "android_webview/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
| 10 #include "android_webview/browser/aw_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "base/memory/ptr_util.h" | 30 #include "base/memory/ptr_util.h" |
| 31 #include "base/path_service.h" | 31 #include "base/path_service.h" |
| 32 #include "components/cdm/browser/cdm_message_filter_android.h" | 32 #include "components/cdm/browser/cdm_message_filter_android.h" |
| 33 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" | 33 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" |
| 34 #include "components/navigation_interception/intercept_navigation_delegate.h" | 34 #include "components/navigation_interception/intercept_navigation_delegate.h" |
| 35 #include "content/public/browser/access_token_store.h" | 35 #include "content/public/browser/access_token_store.h" |
| 36 #include "content/public/browser/browser_message_filter.h" | 36 #include "content/public/browser/browser_message_filter.h" |
| 37 #include "content/public/browser/browser_thread.h" | 37 #include "content/public/browser/browser_thread.h" |
| 38 #include "content/public/browser/child_process_security_policy.h" | 38 #include "content/public/browser/child_process_security_policy.h" |
| 39 #include "content/public/browser/client_certificate_delegate.h" | 39 #include "content/public/browser/client_certificate_delegate.h" |
| 40 #include "content/public/browser/geolocation_delegate.h" |
| 40 #include "content/public/browser/navigation_handle.h" | 41 #include "content/public/browser/navigation_handle.h" |
| 41 #include "content/public/browser/navigation_throttle.h" | 42 #include "content/public/browser/navigation_throttle.h" |
| 42 #include "content/public/browser/render_frame_host.h" | 43 #include "content/public/browser/render_frame_host.h" |
| 43 #include "content/public/browser/render_process_host.h" | 44 #include "content/public/browser/render_process_host.h" |
| 44 #include "content/public/browser/render_view_host.h" | 45 #include "content/public/browser/render_view_host.h" |
| 45 #include "content/public/browser/web_contents.h" | 46 #include "content/public/browser/web_contents.h" |
| 46 #include "content/public/common/content_switches.h" | 47 #include "content/public/common/content_switches.h" |
| 47 #include "content/public/common/url_constants.h" | 48 #include "content/public/common/url_constants.h" |
| 48 #include "content/public/common/web_preferences.h" | 49 #include "content/public/common/web_preferences.h" |
| 49 #include "net/android/network_library.h" | 50 #include "net/android/network_library.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void SaveAccessToken(const GURL& server_url, | 155 void SaveAccessToken(const GURL& server_url, |
| 155 const base::string16& access_token) override {} | 156 const base::string16& access_token) override {} |
| 156 | 157 |
| 157 private: | 158 private: |
| 158 ~AwAccessTokenStore() override {} | 159 ~AwAccessTokenStore() override {} |
| 159 | 160 |
| 160 DISALLOW_COPY_AND_ASSIGN(AwAccessTokenStore); | 161 DISALLOW_COPY_AND_ASSIGN(AwAccessTokenStore); |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 // A provider of Geolocation services to override AccessTokenStore. | 164 // A provider of Geolocation services to override AccessTokenStore. |
| 164 class AwGeolocationDelegate : public content::GeolocationProvider::Delegate { | 165 class AwGeolocationDelegate : public content::GeolocationDelegate { |
| 165 public: | 166 public: |
| 166 AwGeolocationDelegate() = default; | 167 AwGeolocationDelegate() = default; |
| 167 | 168 |
| 168 content::AccessTokenStore* CreateAccessTokenStore() final { | 169 content::AccessTokenStore* CreateAccessTokenStore() final { |
| 169 return new AwAccessTokenStore(); | 170 return new AwAccessTokenStore(); |
| 170 } | 171 } |
| 171 | 172 |
| 172 private: | 173 private: |
| 173 DISALLOW_COPY_AND_ASSIGN(AwGeolocationDelegate); | 174 DISALLOW_COPY_AND_ASSIGN(AwGeolocationDelegate); |
| 174 }; | 175 }; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 } | 435 } |
| 435 | 436 |
| 436 void AwContentBrowserClient::ResourceDispatcherHostCreated() { | 437 void AwContentBrowserClient::ResourceDispatcherHostCreated() { |
| 437 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated(); | 438 AwResourceDispatcherHostDelegate::ResourceDispatcherHostCreated(); |
| 438 } | 439 } |
| 439 | 440 |
| 440 net::NetLog* AwContentBrowserClient::GetNetLog() { | 441 net::NetLog* AwContentBrowserClient::GetNetLog() { |
| 441 return browser_context_->GetAwURLRequestContext()->GetNetLog(); | 442 return browser_context_->GetAwURLRequestContext()->GetNetLog(); |
| 442 } | 443 } |
| 443 | 444 |
| 444 content::GeolocationProvider::Delegate* | 445 content::GeolocationDelegate* |
| 445 AwContentBrowserClient::CreateGeolocationDelegate() { | 446 AwContentBrowserClient::CreateGeolocationDelegate() { |
| 446 return new AwGeolocationDelegate(); | 447 return new AwGeolocationDelegate(); |
| 447 } | 448 } |
| 448 | 449 |
| 449 bool AwContentBrowserClient::IsFastShutdownPossible() { | 450 bool AwContentBrowserClient::IsFastShutdownPossible() { |
| 450 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 451 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 451 switches::kSingleProcess)) { | 452 switches::kSingleProcess)) { |
| 452 NOTREACHED() | 453 NOTREACHED() |
| 453 << "Android WebView is single process, so IsFastShutdownPossible" | 454 << "Android WebView is single process, so IsFastShutdownPossible" |
| 454 << " should never be called"; | 455 << " should never be called"; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 552 |
| 552 #if defined(VIDEO_HOLE) | 553 #if defined(VIDEO_HOLE) |
| 553 content::ExternalVideoSurfaceContainer* | 554 content::ExternalVideoSurfaceContainer* |
| 554 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( | 555 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( |
| 555 content::WebContents* web_contents) { | 556 content::WebContents* web_contents) { |
| 556 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); | 557 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); |
| 557 } | 558 } |
| 558 #endif | 559 #endif |
| 559 | 560 |
| 560 } // namespace android_webview | 561 } // namespace android_webview |
| OLD | NEW |