| 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/common/aw_switches.h" | 8 #include "android_webview/common/aw_switches.h" |
| 9 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 9 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
| 10 #include "android_webview/native/aw_geolocation_permission_context.h" | 10 #include "android_webview/native/aw_geolocation_permission_context.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 namespace { | 78 namespace { |
| 79 bool UIAndRendererCompositorThreadsMerged() { | 79 bool UIAndRendererCompositorThreadsMerged() { |
| 80 return CommandLine::ForCurrentProcess()->HasSwitch( | 80 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 81 switches::kMergeUIAndRendererCompositorThreads); | 81 switches::kMergeUIAndRendererCompositorThreads); |
| 82 } | 82 } |
| 83 | 83 |
| 84 MessageLoop* GetRendererCompositorThreadOverrideLoop() { | 84 MessageLoop* GetRendererCompositorThreadOverrideLoop() { |
| 85 if (!UIAndRendererCompositorThreadsMerged()) | 85 if (!UIAndRendererCompositorThreadsMerged()) |
| 86 return NULL; | 86 return NULL; |
| 87 | 87 |
| 88 MessageLoop* rv = content::BrowserThread::UnsafeGetMessageLoopForThread( | 88 base::MessageLoop* rv = content::BrowserThread::UnsafeGetMessageLoopForThread( |
| 89 content::BrowserThread::UI); | 89 content::BrowserThread::UI); |
| 90 DCHECK(rv); | 90 DCHECK(rv); |
| 91 return rv; | 91 return rv; |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 content::ContentRendererClient* | 95 content::ContentRendererClient* |
| 96 AwMainDelegate::CreateContentRendererClient() { | 96 AwMainDelegate::CreateContentRendererClient() { |
| 97 // Compositor input handling will be performed by the renderer host | 97 // Compositor input handling will be performed by the renderer host |
| 98 // when UI and compositor threads are merged, so we disable client compositor | 98 // when UI and compositor threads are merged, so we disable client compositor |
| (...skipping 16 matching lines...) Expand all Loading... |
| 115 AwBrowserContext* browser_context) { | 115 AwBrowserContext* browser_context) { |
| 116 return AwGeolocationPermissionContext::Create(browser_context); | 116 return AwGeolocationPermissionContext::Create(browser_context); |
| 117 } | 117 } |
| 118 | 118 |
| 119 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( | 119 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( |
| 120 content::WebContents* web_contents) { | 120 content::WebContents* web_contents) { |
| 121 return AwWebContentsViewDelegate::Create(web_contents); | 121 return AwWebContentsViewDelegate::Create(web_contents); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace android_webview | 124 } // namespace android_webview |
| OLD | NEW |