| 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 #ifndef ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
| 6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "android_webview/browser/aw_web_preferences_populater.h" | 12 #include "android_webview/browser/aw_web_preferences_populater.h" |
| 11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 14 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | |
| 14 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
| 15 | 16 |
| 16 namespace android_webview { | 17 namespace android_webview { |
| 17 | 18 |
| 18 class AwBrowserContext; | 19 class AwBrowserContext; |
| 19 class JniDependencyFactory; | 20 class JniDependencyFactory; |
| 20 | 21 |
| 21 class AwContentBrowserClient : public content::ContentBrowserClient { | 22 class AwContentBrowserClient : public content::ContentBrowserClient { |
| 22 public: | 23 public: |
| 23 // This is what AwContentBrowserClient::GetAcceptLangs uses. | 24 // This is what AwContentBrowserClient::GetAcceptLangs uses. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 const GURL& request_url, | 93 const GURL& request_url, |
| 93 content::ResourceType resource_type, | 94 content::ResourceType resource_type, |
| 94 bool overridable, | 95 bool overridable, |
| 95 bool strict_enforcement, | 96 bool strict_enforcement, |
| 96 bool expired_previous_decision, | 97 bool expired_previous_decision, |
| 97 const base::Callback<void(bool)>& callback, | 98 const base::Callback<void(bool)>& callback, |
| 98 content::CertificateRequestResultType* result) override; | 99 content::CertificateRequestResultType* result) override; |
| 99 void SelectClientCertificate( | 100 void SelectClientCertificate( |
| 100 content::WebContents* web_contents, | 101 content::WebContents* web_contents, |
| 101 net::SSLCertRequestInfo* cert_request_info, | 102 net::SSLCertRequestInfo* cert_request_info, |
| 102 scoped_ptr<content::ClientCertificateDelegate> delegate) override; | 103 std::unique_ptr<content::ClientCertificateDelegate> delegate) override; |
| 103 bool CanCreateWindow(const GURL& opener_url, | 104 bool CanCreateWindow(const GURL& opener_url, |
| 104 const GURL& opener_top_level_frame_url, | 105 const GURL& opener_top_level_frame_url, |
| 105 const GURL& source_origin, | 106 const GURL& source_origin, |
| 106 WindowContainerType container_type, | 107 WindowContainerType container_type, |
| 107 const GURL& target_url, | 108 const GURL& target_url, |
| 108 const content::Referrer& referrer, | 109 const content::Referrer& referrer, |
| 109 WindowOpenDisposition disposition, | 110 WindowOpenDisposition disposition, |
| 110 const blink::WebWindowFeatures& features, | 111 const blink::WebWindowFeatures& features, |
| 111 bool user_gesture, | 112 bool user_gesture, |
| 112 bool opener_suppressed, | 113 bool opener_suppressed, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 140 content::NavigationHandle* navigation_handle) override; | 141 content::NavigationHandle* navigation_handle) override; |
| 141 #if defined(VIDEO_HOLE) | 142 #if defined(VIDEO_HOLE) |
| 142 content::ExternalVideoSurfaceContainer* | 143 content::ExternalVideoSurfaceContainer* |
| 143 OverrideCreateExternalVideoSurfaceContainer( | 144 OverrideCreateExternalVideoSurfaceContainer( |
| 144 content::WebContents* web_contents) override; | 145 content::WebContents* web_contents) override; |
| 145 #endif | 146 #endif |
| 146 | 147 |
| 147 private: | 148 private: |
| 148 // Android WebView currently has a single global (non-off-the-record) browser | 149 // Android WebView currently has a single global (non-off-the-record) browser |
| 149 // context. | 150 // context. |
| 150 scoped_ptr<AwBrowserContext> browser_context_; | 151 std::unique_ptr<AwBrowserContext> browser_context_; |
| 151 scoped_ptr<AwWebPreferencesPopulater> preferences_populater_; | 152 std::unique_ptr<AwWebPreferencesPopulater> preferences_populater_; |
| 152 | 153 |
| 153 JniDependencyFactory* native_factory_; | 154 JniDependencyFactory* native_factory_; |
| 154 | 155 |
| 155 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); | 156 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 } // namespace android_webview | 159 } // namespace android_webview |
| 159 | 160 |
| 160 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 161 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |