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

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

Issue 8636001: Removing TOUCH_UI from content renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove 2 files handled (better) in another CL. Created 9 years 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 | content/renderer/render_view_impl.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 using WebKit::WebRuntimeFeatures; 96 using WebKit::WebRuntimeFeatures;
97 using WebKit::WebScriptController; 97 using WebKit::WebScriptController;
98 using WebKit::WebString; 98 using WebKit::WebString;
99 using WebKit::WebStorageEventDispatcher; 99 using WebKit::WebStorageEventDispatcher;
100 using WebKit::WebView; 100 using WebKit::WebView;
101 using content::RenderProcessObserver; 101 using content::RenderProcessObserver;
102 102
103 namespace { 103 namespace {
104 static const int64 kInitialIdleHandlerDelayMs = 1000; 104 static const int64 kInitialIdleHandlerDelayMs = 1000;
105 105
106 #if defined(TOUCH_UI)
107 static const int kPopupListBoxMinimumRowHeight = 60;
108 #endif
109
110 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access 106 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access
111 // incorrectly from the wrong thread. 107 // incorrectly from the wrong thread.
112 static base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > 108 static base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> >
113 lazy_tls = LAZY_INSTANCE_INITIALIZER; 109 lazy_tls = LAZY_INSTANCE_INITIALIZER;
114 110
115 class RenderViewZoomer : public content::RenderViewVisitor { 111 class RenderViewZoomer : public content::RenderViewVisitor {
116 public: 112 public:
117 RenderViewZoomer(const GURL& url, double zoom_level) 113 RenderViewZoomer(const GURL& url, double zoom_level)
118 : zoom_level_(zoom_level) { 114 : zoom_level_(zoom_level) {
119 host_ = net::GetHostOrSpecFromURL(url); 115 host_ = net::GetHostOrSpecFromURL(url);
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 #if defined(OS_CHROMEOS) 504 #if defined(OS_CHROMEOS)
509 // TODO(crogers): enable once Web Audio has been tested and optimized. 505 // TODO(crogers): enable once Web Audio has been tested and optimized.
510 WebRuntimeFeatures::enableWebAudio(false); 506 WebRuntimeFeatures::enableWebAudio(false);
511 #else 507 #else
512 WebRuntimeFeatures::enableWebAudio( 508 WebRuntimeFeatures::enableWebAudio(
513 !command_line.HasSwitch(switches::kDisableWebAudio)); 509 !command_line.HasSwitch(switches::kDisableWebAudio));
514 #endif 510 #endif
515 511
516 WebRuntimeFeatures::enablePushState(true); 512 WebRuntimeFeatures::enablePushState(true);
517 513
518 #ifdef TOUCH_UI
519 WebRuntimeFeatures::enableTouch(true);
520 WebKit::WebPopupMenu::setMinimumRowHeight(kPopupListBoxMinimumRowHeight);
521 #else
522 WebRuntimeFeatures::enableTouch(false); 514 WebRuntimeFeatures::enableTouch(false);
523 #endif
524 515
525 WebRuntimeFeatures::enableDeviceMotion( 516 WebRuntimeFeatures::enableDeviceMotion(
526 command_line.HasSwitch(switches::kEnableDeviceMotion)); 517 command_line.HasSwitch(switches::kEnableDeviceMotion));
527 518
528 WebRuntimeFeatures::enableDeviceOrientation( 519 WebRuntimeFeatures::enableDeviceOrientation(
529 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); 520 !command_line.HasSwitch(switches::kDisableDeviceOrientation));
530 521
531 WebRuntimeFeatures::enableSpeechInput( 522 WebRuntimeFeatures::enableSpeechInput(
532 !command_line.HasSwitch(switches::kDisableSpeechInput)); 523 !command_line.HasSwitch(switches::kDisableSpeechInput));
533 524
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 796
806 scoped_refptr<base::MessageLoopProxy> 797 scoped_refptr<base::MessageLoopProxy>
807 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 798 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
808 DCHECK(message_loop() == MessageLoop::current()); 799 DCHECK(message_loop() == MessageLoop::current());
809 if (!file_thread_.get()) { 800 if (!file_thread_.get()) {
810 file_thread_.reset(new base::Thread("Renderer::FILE")); 801 file_thread_.reset(new base::Thread("Renderer::FILE"));
811 file_thread_->Start(); 802 file_thread_->Start();
812 } 803 }
813 return file_thread_->message_loop_proxy(); 804 return file_thread_->message_loop_proxy();
814 } 805 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698