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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 10810034: disable web audio by default on android and add switches to enable it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « content/public/common/content_switches.cc ('k') | 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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 572
573 WebKit::WebRuntimeFeatures::enablePointerLock( 573 WebKit::WebRuntimeFeatures::enablePointerLock(
574 !command_line.HasSwitch(switches::kDisablePointerLock)); 574 !command_line.HasSwitch(switches::kDisablePointerLock));
575 575
576 WebKit::WebRuntimeFeatures::enableVideoTrack( 576 WebKit::WebRuntimeFeatures::enableVideoTrack(
577 command_line.HasSwitch(switches::kEnableVideoTrack)); 577 command_line.HasSwitch(switches::kEnableVideoTrack));
578 578
579 WebKit::WebRuntimeFeatures::enableEncryptedMedia( 579 WebKit::WebRuntimeFeatures::enableEncryptedMedia(
580 command_line.HasSwitch(switches::kEnableEncryptedMedia)); 580 command_line.HasSwitch(switches::kEnableEncryptedMedia));
581 581
582 #if defined(OS_ANDROID)
583 WebRuntimeFeatures::enableWebAudio(
584 command_line.HasSwitch(switches::kEnableWebAudio) &&
585 media::IsMediaLibraryInitialized());
586 #else
582 WebRuntimeFeatures::enableWebAudio( 587 WebRuntimeFeatures::enableWebAudio(
583 !command_line.HasSwitch(switches::kDisableWebAudio) && 588 !command_line.HasSwitch(switches::kDisableWebAudio) &&
584 media::IsMediaLibraryInitialized()); 589 media::IsMediaLibraryInitialized());
590 #endif
585 591
586 WebRuntimeFeatures::enablePushState(true); 592 WebRuntimeFeatures::enablePushState(true);
587 593
588 WebRuntimeFeatures::enableTouch( 594 WebRuntimeFeatures::enableTouch(
589 command_line.HasSwitch(switches::kEnableTouchEvents)); 595 command_line.HasSwitch(switches::kEnableTouchEvents));
590 596
591 WebRuntimeFeatures::enableDeviceMotion( 597 WebRuntimeFeatures::enableDeviceMotion(
592 command_line.HasSwitch(switches::kEnableDeviceMotion)); 598 command_line.HasSwitch(switches::kEnableDeviceMotion));
593 599
594 WebRuntimeFeatures::enableDeviceOrientation( 600 WebRuntimeFeatures::enableDeviceOrientation(
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1061
1056 scoped_refptr<base::MessageLoopProxy> 1062 scoped_refptr<base::MessageLoopProxy>
1057 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1063 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1058 DCHECK(message_loop() == MessageLoop::current()); 1064 DCHECK(message_loop() == MessageLoop::current());
1059 if (!file_thread_.get()) { 1065 if (!file_thread_.get()) {
1060 file_thread_.reset(new base::Thread("Renderer::FILE")); 1066 file_thread_.reset(new base::Thread("Renderer::FILE"));
1061 file_thread_->Start(); 1067 file_thread_->Start();
1062 } 1068 }
1063 return file_thread_->message_loop_proxy(); 1069 return file_thread_->message_loop_proxy();
1064 } 1070 }
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698