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 "android_webview/browser/aw_browser_main_parts.h" | 7 #include "android_webview/browser/aw_browser_main_parts.h" |
8 #include "android_webview/browser/aw_cookie_access_policy.h" | 8 #include "android_webview/browser/aw_cookie_access_policy.h" |
9 #include "android_webview/browser/aw_quota_permission_context.h" | 9 #include "android_webview/browser/aw_quota_permission_context.h" |
10 #include "android_webview/browser/net_disk_cache_remover.h" | 10 #include "android_webview/browser/net_disk_cache_remover.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 const GURL& server_url, const string16& access_token) OVERRIDE { } | 37 const GURL& server_url, const string16& access_token) OVERRIDE { } |
38 | 38 |
39 DISALLOW_COPY_AND_ASSIGN(DummyAccessTokenStore); | 39 DISALLOW_COPY_AND_ASSIGN(DummyAccessTokenStore); |
40 }; | 40 }; |
41 | 41 |
42 } | 42 } |
43 | 43 |
44 namespace android_webview { | 44 namespace android_webview { |
45 | 45 |
46 AwContentBrowserClient::AwContentBrowserClient( | 46 AwContentBrowserClient::AwContentBrowserClient( |
47 ViewDelegateFactoryFn* view_delegate_factory) | 47 ViewDelegateFactoryFn* view_delegate_factory, |
| 48 GeolocationPermissionFactoryFn* geolocation_permission_factory) |
48 : view_delegate_factory_(view_delegate_factory) { | 49 : view_delegate_factory_(view_delegate_factory) { |
49 FilePath user_data_dir; | 50 FilePath user_data_dir; |
50 if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) { | 51 if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) { |
51 NOTREACHED() << "Failed to get app data directory for Android WebView"; | 52 NOTREACHED() << "Failed to get app data directory for Android WebView"; |
52 } | 53 } |
53 browser_context_.reset(new AwBrowserContext(user_data_dir)); | 54 browser_context_.reset( |
| 55 new AwBrowserContext(user_data_dir, geolocation_permission_factory)); |
54 } | 56 } |
55 | 57 |
56 AwContentBrowserClient::~AwContentBrowserClient() { | 58 AwContentBrowserClient::~AwContentBrowserClient() { |
57 } | 59 } |
58 | 60 |
59 AwBrowserContext* AwContentBrowserClient::GetAwBrowserContext() { | 61 AwBrowserContext* AwContentBrowserClient::GetAwBrowserContext() { |
60 return browser_context_.get(); | 62 return browser_context_.get(); |
61 } | 63 } |
62 | 64 |
63 content::BrowserMainParts* AwContentBrowserClient::CreateBrowserMainParts( | 65 content::BrowserMainParts* AwContentBrowserClient::CreateBrowserMainParts( |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 335 |
334 bool AwContentBrowserClient::AllowPepperSocketAPI( | 336 bool AwContentBrowserClient::AllowPepperSocketAPI( |
335 content::BrowserContext* browser_context, | 337 content::BrowserContext* browser_context, |
336 const GURL& url, | 338 const GURL& url, |
337 const content::SocketPermissionRequest& params) { | 339 const content::SocketPermissionRequest& params) { |
338 NOTREACHED() << "Android WebView does not support plugins"; | 340 NOTREACHED() << "Android WebView does not support plugins"; |
339 return false; | 341 return false; |
340 } | 342 } |
341 | 343 |
342 } // namespace android_webview | 344 } // namespace android_webview |
OLD | NEW |