| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/public/browser/content_browser_client.h" | 11 #include "content/public/browser/content_browser_client.h" |
| 12 #include "net/url_request/url_request_job_factory.h" | 12 #include "net/url_request/url_request_job_factory.h" |
| 13 | 13 |
| 14 struct WebPreferences; |
| 15 |
| 14 namespace android_webview { | 16 namespace android_webview { |
| 15 | 17 |
| 16 class AwBrowserContext; | 18 class AwBrowserContext; |
| 17 class JniDependencyFactory; | 19 class JniDependencyFactory; |
| 18 | 20 |
| 19 class AwContentBrowserClient : public content::ContentBrowserClient { | 21 class AwContentBrowserClient : public content::ContentBrowserClient { |
| 20 public: | 22 public: |
| 21 // This is what AwContentBrowserClient::GetAcceptLangs uses. | 23 // This is what AwContentBrowserClient::GetAcceptLangs uses. |
| 22 static std::string GetAcceptLangsImpl(); | 24 static std::string GetAcceptLangsImpl(); |
| 23 | 25 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; | 145 virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; |
| 144 virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE; | 146 virtual base::FilePath GetDefaultDownloadDirectory() OVERRIDE; |
| 145 virtual std::string GetDefaultDownloadName() OVERRIDE; | 147 virtual std::string GetDefaultDownloadName() OVERRIDE; |
| 146 virtual void DidCreatePpapiPlugin( | 148 virtual void DidCreatePpapiPlugin( |
| 147 content::BrowserPpapiHost* browser_host) OVERRIDE; | 149 content::BrowserPpapiHost* browser_host) OVERRIDE; |
| 148 virtual bool AllowPepperSocketAPI( | 150 virtual bool AllowPepperSocketAPI( |
| 149 content::BrowserContext* browser_context, | 151 content::BrowserContext* browser_context, |
| 150 const GURL& url, | 152 const GURL& url, |
| 151 bool private_api, | 153 bool private_api, |
| 152 const content::SocketPermissionRequest* params) OVERRIDE; | 154 const content::SocketPermissionRequest* params) OVERRIDE; |
| 155 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
| 156 const GURL& url, |
| 157 WebPreferences* web_prefs) OVERRIDE; |
| 153 | 158 |
| 154 private: | 159 private: |
| 155 // Android WebView currently has a single global (non-off-the-record) browser | 160 // Android WebView currently has a single global (non-off-the-record) browser |
| 156 // context. | 161 // context. |
| 157 scoped_ptr<AwBrowserContext> browser_context_; | 162 scoped_ptr<AwBrowserContext> browser_context_; |
| 158 | 163 |
| 159 JniDependencyFactory* native_factory_; | 164 JniDependencyFactory* native_factory_; |
| 160 | 165 |
| 161 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); | 166 DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient); |
| 162 }; | 167 }; |
| 163 | 168 |
| 164 } // namespace android_webview | 169 } // namespace android_webview |
| 165 | 170 |
| 166 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 171 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |