Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: android_webview/browser/aw_content_browser_client.h

Issue 1852513003: Convert //android_webview to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git is hard Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_policy_connector.cc ('k') | android_webview/browser/aw_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698