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