| 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 "chrome/browser/chrome_content_browser_client.h" | 8 #include "chrome/browser/chrome_content_browser_client.h" |
| 9 | 9 |
| 10 namespace android_webview { | 10 namespace android_webview { |
| 11 | 11 |
| 12 // TODO(boliu): Remove chrome/ dependency and inherit from | 12 // TODO(boliu): Remove chrome/ dependency and inherit from |
| 13 // content::ContentBrowserClient directly. | 13 // content::ContentBrowserClient directly. |
| 14 class AwContentBrowserClient : public chrome::ChromeContentBrowserClient { | 14 class AwContentBrowserClient : public chrome::ChromeContentBrowserClient { |
| 15 public: | 15 public: |
| 16 AwContentBrowserClient(); | 16 AwContentBrowserClient(); |
| 17 virtual ~AwContentBrowserClient(); | 17 virtual ~AwContentBrowserClient(); |
| 18 | 18 |
| 19 // Overriden methods from ContentBrowserClient. | 19 // Overriden methods from ContentBrowserClient. |
| 20 virtual void ResourceDispatcherHostCreated() OVERRIDE; | 20 virtual void ResourceDispatcherHostCreated() OVERRIDE; |
| 21 virtual bool AllowGetCookie(const GURL& url, |
| 22 const GURL& first_party, |
| 23 const net::CookieList& cookie_list, |
| 24 content::ResourceContext* context, |
| 25 int render_process_id, |
| 26 int render_view_id) OVERRIDE; |
| 27 virtual bool AllowSetCookie(const GURL& url, |
| 28 const GURL& first_party, |
| 29 const std::string& cookie_line, |
| 30 content::ResourceContext* context, |
| 31 int render_process_id, |
| 32 int render_view_id, |
| 33 net::CookieOptions* options) OVERRIDE; |
| 21 }; | 34 }; |
| 22 | 35 |
| 23 } // namespace android_webview | 36 } // namespace android_webview |
| 24 | 37 |
| 25 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ | 38 #endif // ANDROID_WEBVIEW_LIB_AW_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |