| 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/browser/aw_browser_main_parts.h" | 5 #include "android_webview/browser/aw_browser_main_parts.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "android_webview/browser/aw_result_codes.h" | 8 #include "android_webview/browser/aw_result_codes.h" |
| 9 #include "android_webview/native/aw_assets.h" | 9 #include "android_webview/native/aw_assets.h" |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( | 93 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( |
| 94 base::android::AttachCurrentThread()); | 94 base::android::AttachCurrentThread()); |
| 95 | 95 |
| 96 return content::RESULT_CODE_NORMAL_EXIT; | 96 return content::RESULT_CODE_NORMAL_EXIT; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void AwBrowserMainParts::PreMainMessageLoopRun() { | 99 void AwBrowserMainParts::PreMainMessageLoopRun() { |
| 100 // TODO(boliu): Can't support accelerated 2d canvas and WebGL with ubercomp | 100 // TODO(boliu): Can't support accelerated 2d canvas and WebGL with ubercomp |
| 101 // yet: crbug.com/352424. | 101 // yet: crbug.com/352424. |
| 102 if (!gpu::gles2::MailboxSynchronizer::Initialize()) { | 102 if (!gpu::gles2::MailboxSynchronizer::Initialize()) { |
| 103 CommandLine* cl = CommandLine::ForCurrentProcess(); | 103 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
| 104 cl->AppendSwitch(switches::kDisableAccelerated2dCanvas); | 104 cl->AppendSwitch(switches::kDisableAccelerated2dCanvas); |
| 105 cl->AppendSwitch(switches::kDisableExperimentalWebGL); | 105 cl->AppendSwitch(switches::kDisableExperimentalWebGL); |
| 106 } | 106 } |
| 107 | 107 |
| 108 browser_context_->PreMainMessageLoopRun(); | 108 browser_context_->PreMainMessageLoopRun(); |
| 109 // This is needed for WebView Classic backwards compatibility | 109 // This is needed for WebView Classic backwards compatibility |
| 110 // See crbug.com/298495 | 110 // See crbug.com/298495 |
| 111 content::SetMaxURLChars(20 * 1024 * 1024); | 111 content::SetMaxURLChars(20 * 1024 * 1024); |
| 112 } | 112 } |
| 113 | 113 |
| 114 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { | 114 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { |
| 115 // Android WebView does not use default MessageLoop. It has its own | 115 // Android WebView does not use default MessageLoop. It has its own |
| 116 // Android specific MessageLoop. | 116 // Android specific MessageLoop. |
| 117 return true; | 117 return true; |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace android_webview | 120 } // namespace android_webview |
| OLD | NEW |