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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 12722002: Enable pinch & scrollbars by default for CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 results->availableRect = display.work_area(); 253 results->availableRect = display.work_area();
254 // TODO(derat|oshima): Don't hardcode this. Get this from display object. 254 // TODO(derat|oshima): Don't hardcode this. Get this from display object.
255 results->depth = 24; 255 results->depth = 24;
256 results->depthPerComponent = 8; 256 results->depthPerComponent = 8;
257 results->deviceScaleFactor = display.device_scale_factor(); 257 results->deviceScaleFactor = display.device_scale_factor();
258 } 258 }
259 259
260 bool ShouldSendPinchGesture() { 260 bool ShouldSendPinchGesture() {
261 static bool pinch_allowed = 261 static bool pinch_allowed =
262 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableViewport) || 262 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableViewport) ||
263 #if defined(OS_CHROMEOS)
264 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePinch);
265 #else
263 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePinch); 266 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePinch);
267 #endif
264 return pinch_allowed; 268 return pinch_allowed;
265 } 269 }
266 270
267 bool PointerEventActivates(const ui::Event& event) { 271 bool PointerEventActivates(const ui::Event& event) {
268 if (event.type() == ui::ET_MOUSE_PRESSED) 272 if (event.type() == ui::ET_MOUSE_PRESSED)
269 return true; 273 return true;
270 274
271 if (event.type() == ui::ET_GESTURE_BEGIN) { 275 if (event.type() == ui::ET_GESTURE_BEGIN) {
272 const ui::GestureEvent& gesture = 276 const ui::GestureEvent& gesture =
273 static_cast<const ui::GestureEvent&>(event); 277 static_cast<const ui::GestureEvent&>(event);
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 RenderWidgetHost* widget) { 2488 RenderWidgetHost* widget) {
2485 return new RenderWidgetHostViewAura(widget); 2489 return new RenderWidgetHostViewAura(widget);
2486 } 2490 }
2487 2491
2488 // static 2492 // static
2489 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2493 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2490 GetScreenInfoForWindow(results, NULL); 2494 GetScreenInfoForWindow(results, NULL);
2491 } 2495 }
2492 2496
2493 } // namespace content 2497 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698