Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(621)

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 459023002: aw: Use async upload by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/browser_view_renderer.h" 8 #include "android_webview/browser/browser_view_renderer.h"
9 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" 9 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h"
10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 AwMainDelegate::~AwMainDelegate() { 47 AwMainDelegate::~AwMainDelegate() {
48 } 48 }
49 49
50 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { 50 bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
51 content::SetContentClient(&content_client_); 51 content::SetContentClient(&content_client_);
52 52
53 CommandLine* cl = CommandLine::ForCurrentProcess(); 53 CommandLine* cl = CommandLine::ForCurrentProcess();
54 bool zero_copy_disabled_by_switch = cl->HasSwitch(switches::kDisableZeroCopy); 54 bool zero_copy_disabled_by_switch = cl->HasSwitch(switches::kDisableZeroCopy);
55 bool use_zero_copy = !zero_copy_disabled_by_switch && 55 bool use_zero_copy = !zero_copy_disabled_by_switch &&
56 cl->HasSwitch(switches::kEnableZeroCopy) &&
hush (inactive) 2014/08/11 17:12:49 we have both kEnableZeroCopy and kDisableZeroCopy
boliu 2014/08/11 17:15:06 The rule is always disable trumps enable.
hush (inactive) 2014/08/11 17:38:51 Seems like content owners added it on purpose in t
56 gpu_memory_buffer_factory_.get()->Initialize(); 57 gpu_memory_buffer_factory_.get()->Initialize();
57 58
58 if (use_zero_copy) { 59 if (use_zero_copy) {
59 cl->AppendSwitch(switches::kEnableZeroCopy); 60 cl->AppendSwitch(switches::kEnableZeroCopy);
60 } else if (!zero_copy_disabled_by_switch) { 61 } else if (!zero_copy_disabled_by_switch) {
61 cl->AppendSwitch(switches::kDisableZeroCopy); 62 cl->AppendSwitch(switches::kDisableZeroCopy);
62 } 63 }
63 64
64 content::BrowserMediaPlayerManager::RegisterMediaUrlInterceptor( 65 content::BrowserMediaPlayerManager::RegisterMediaUrlInterceptor(
65 new AwMediaUrlInterceptor()); 66 new AwMediaUrlInterceptor());
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 159
159 #if defined(VIDEO_HOLE) 160 #if defined(VIDEO_HOLE)
160 content::ExternalVideoSurfaceContainer* 161 content::ExternalVideoSurfaceContainer*
161 AwMainDelegate::CreateExternalVideoSurfaceContainer( 162 AwMainDelegate::CreateExternalVideoSurfaceContainer(
162 content::WebContents* web_contents) { 163 content::WebContents* web_contents) {
163 return new ExternalVideoSurfaceContainerImpl(web_contents); 164 return new ExternalVideoSurfaceContainerImpl(web_contents);
164 } 165 }
165 #endif 166 #endif
166 167
167 } // namespace android_webview 168 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698