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 13 matching lines...) Expand all Loading... |
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 synchronous API compatibility. |
32 command_line->AppendSwitch(switches::kEnableWebViewSynchronousAPIs); | 32 command_line->AppendSwitch(switches::kEnableWebViewSynchronousAPIs); |
33 | 33 |
34 // TODO(leandrogracia): enable with the CapturePicture API support. | |
35 if (false) { | |
36 // Enable impl-side painting in the compositor. | |
37 command_line->AppendSwitch(switches::kForceCompositingMode); | |
38 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | |
39 command_line->AppendSwitch(switches::kEnableDeferredImageDecoding); | |
40 command_line->AppendSwitch(cc::switches::kEnableImplSidePainting); | |
41 } | |
42 | |
43 return false; | 34 return false; |
44 } | 35 } |
45 | 36 |
46 void AwMainDelegate::PreSandboxStartup() { | 37 void AwMainDelegate::PreSandboxStartup() { |
47 // TODO(torne): When we have a separate renderer process, we need to handle | 38 // TODO(torne): When we have a separate renderer process, we need to handle |
48 // being passed open FDs for the resource paks here. | 39 // being passed open FDs for the resource paks here. |
49 } | 40 } |
50 | 41 |
51 void AwMainDelegate::SandboxInitialized(const std::string& process_type) { | 42 void AwMainDelegate::SandboxInitialized(const std::string& process_type) { |
52 // TODO(torne): Adjust linux OOM score here. | 43 // TODO(torne): Adjust linux OOM score here. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return content_browser_client_.get(); | 77 return content_browser_client_.get(); |
87 } | 78 } |
88 | 79 |
89 content::ContentRendererClient* | 80 content::ContentRendererClient* |
90 AwMainDelegate::CreateContentRendererClient() { | 81 AwMainDelegate::CreateContentRendererClient() { |
91 content_renderer_client_.reset(new AwContentRendererClient()); | 82 content_renderer_client_.reset(new AwContentRendererClient()); |
92 return content_renderer_client_.get(); | 83 return content_renderer_client_.get(); |
93 } | 84 } |
94 | 85 |
95 } // namespace android_webview | 86 } // namespace android_webview |
OLD | NEW |