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/lib/main/aw_main_delegate.h" | 5 #include "android_webview/lib/main/aw_main_delegate.h" |
6 | 6 |
7 #include "android_webview/browser/aw_content_browser_client.h" | 7 #include "android_webview/browser/aw_content_browser_client.h" |
8 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 8 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
9 #include "android_webview/native/aw_geolocation_permission_context.h" | 9 #include "android_webview/native/aw_geolocation_permission_context.h" |
| 10 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
10 #include "android_webview/native/aw_web_contents_view_delegate.h" | 11 #include "android_webview/native/aw_web_contents_view_delegate.h" |
11 #include "android_webview/renderer/aw_content_renderer_client.h" | 12 #include "android_webview/renderer/aw_content_renderer_client.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "cc/switches.h" | 16 #include "cc/switches.h" |
16 #include "content/public/browser/browser_main_runner.h" | 17 #include "content/public/browser/browser_main_runner.h" |
17 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
18 | 19 |
19 namespace android_webview { | 20 namespace android_webview { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 63 } |
63 | 64 |
64 void AwMainDelegate::ProcessExiting(const std::string& process_type) { | 65 void AwMainDelegate::ProcessExiting(const std::string& process_type) { |
65 // TODO(torne): Clean up resources when we handle them. | 66 // TODO(torne): Clean up resources when we handle them. |
66 | 67 |
67 logging::CloseLogFile(); | 68 logging::CloseLogFile(); |
68 } | 69 } |
69 | 70 |
70 content::ContentBrowserClient* | 71 content::ContentBrowserClient* |
71 AwMainDelegate::CreateContentBrowserClient() { | 72 AwMainDelegate::CreateContentBrowserClient() { |
72 content_browser_client_.reset( | 73 content_browser_client_.reset(new AwContentBrowserClient(this)); |
73 new AwContentBrowserClient( | |
74 &AwWebContentsViewDelegate::Create, | |
75 &AwGeolocationPermissionContext::Create)); | |
76 | |
77 return content_browser_client_.get(); | 74 return content_browser_client_.get(); |
78 } | 75 } |
79 | 76 |
80 content::ContentRendererClient* | 77 content::ContentRendererClient* |
81 AwMainDelegate::CreateContentRendererClient() { | 78 AwMainDelegate::CreateContentRendererClient() { |
82 content_renderer_client_.reset(new AwContentRendererClient()); | 79 content_renderer_client_.reset(new AwContentRendererClient()); |
83 return content_renderer_client_.get(); | 80 return content_renderer_client_.get(); |
84 } | 81 } |
85 | 82 |
| 83 AwQuotaManagerBridge* AwMainDelegate::CreateAwQuotaManagerBridge( |
| 84 AwBrowserContext* browser_context) { |
| 85 return new AwQuotaManagerBridgeImpl(browser_context); |
| 86 } |
| 87 |
| 88 content::GeolocationPermissionContext* |
| 89 AwMainDelegate::CreateGeolocationPermission( |
| 90 AwBrowserContext* browser_context) { |
| 91 return AwGeolocationPermissionContext::Create(browser_context); |
| 92 } |
| 93 |
| 94 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( |
| 95 content::WebContents* web_contents) { |
| 96 return AwWebContentsViewDelegate::Create(web_contents); |
| 97 } |
| 98 |
86 } // namespace android_webview | 99 } // namespace android_webview |
OLD | NEW |