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_web_contents_view_delegate.h" | 10 #include "android_webview/native/aw_web_contents_view_delegate.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 AwMainDelegate::AwMainDelegate() { | 21 AwMainDelegate::AwMainDelegate() { |
22 } | 22 } |
23 | 23 |
24 AwMainDelegate::~AwMainDelegate() { | 24 AwMainDelegate::~AwMainDelegate() { |
25 } | 25 } |
26 | 26 |
27 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { | 27 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { |
28 content::SetContentClient(&content_client_); | 28 content::SetContentClient(&content_client_); |
29 | 29 |
30 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 30 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
31 // Set the command line to enable synchronous API compatibility. | 31 // Set the command line to enable compatibility with legacy WebView |
| 32 // synchronous APIs and capture picture. |
32 command_line->AppendSwitch(switches::kEnableWebViewSynchronousAPIs); | 33 command_line->AppendSwitch(switches::kEnableWebViewSynchronousAPIs); |
| 34 command_line->AppendSwitch(switches::kEnableWebViewCapturePictureAPI); |
33 | 35 |
34 // TODO(leandrogracia): enable with the CapturePicture API support. | 36 // TODO(leandrogracia): enable with the CapturePicture API support. |
35 if (false) { | 37 if (false) { |
36 // Enable impl-side painting in the compositor. | 38 // Enable impl-side painting in the compositor. |
37 command_line->AppendSwitch(switches::kForceCompositingMode); | 39 command_line->AppendSwitch(switches::kForceCompositingMode); |
38 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | 40 command_line->AppendSwitch(switches::kEnableThreadedCompositing); |
39 command_line->AppendSwitch(switches::kEnableDeferredImageDecoding); | 41 command_line->AppendSwitch(switches::kEnableDeferredImageDecoding); |
40 command_line->AppendSwitch(cc::switches::kEnableImplSidePainting); | 42 command_line->AppendSwitch(cc::switches::kEnableImplSidePainting); |
41 } | 43 } |
42 | 44 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return content_browser_client_.get(); | 88 return content_browser_client_.get(); |
87 } | 89 } |
88 | 90 |
89 content::ContentRendererClient* | 91 content::ContentRendererClient* |
90 AwMainDelegate::CreateContentRendererClient() { | 92 AwMainDelegate::CreateContentRendererClient() { |
91 content_renderer_client_.reset(new AwContentRendererClient()); | 93 content_renderer_client_.reset(new AwContentRendererClient()); |
92 return content_renderer_client_.get(); | 94 return content_renderer_client_.get(); |
93 } | 95 } |
94 | 96 |
95 } // namespace android_webview | 97 } // namespace android_webview |
OLD | NEW |