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

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

Issue 696713002: Pointer/hover media query support: platform-dependent changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « android_webview/libwebviewchromium.gypi ('k') | ui/android/BUILD.gn » ('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) 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_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( 417 const std::string autoplay_group_name = base::FieldTrialList::FindFullName(
418 "MediaElementAutoplay"); 418 "MediaElementAutoplay");
419 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( 419 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
420 switches::kDisableGestureRequirementForMediaPlayback) && 420 switches::kDisableGestureRequirementForMediaPlayback) &&
421 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); 421 (autoplay_group_name.empty() || autoplay_group_name != "Enabled");
422 #endif 422 #endif
423 423
424 prefs.touch_enabled = ui::AreTouchEventsEnabled(); 424 prefs.touch_enabled = ui::AreTouchEventsEnabled();
425 prefs.device_supports_touch = prefs.touch_enabled && 425 prefs.device_supports_touch = prefs.touch_enabled &&
426 ui::IsTouchDevicePresent(); 426 ui::IsTouchDevicePresent();
427 prefs.available_pointer_types = ui::GetAvailablePointerTypes();
428 prefs.primary_pointer_type = ui::GetPrimaryPointerType();
429 prefs.available_hover_types = ui::GetAvailableHoverTypes();
430 prefs.primary_hover_type = ui::GetPrimaryHoverType();
431
427 #if defined(OS_ANDROID) 432 #if defined(OS_ANDROID)
428 prefs.device_supports_mouse = false; 433 prefs.device_supports_mouse = false;
429 #endif 434 #endif
430 435
431 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); 436 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();
432 437
433 prefs.touch_adjustment_enabled = 438 prefs.touch_adjustment_enabled =
434 !command_line.HasSwitch(switches::kDisableTouchAdjustment); 439 !command_line.HasSwitch(switches::kDisableTouchAdjustment);
435 440
436 prefs.slimming_paint_enabled = 441 prefs.slimming_paint_enabled =
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 FrameTree* frame_tree = delegate_->GetFrameTree(); 1472 FrameTree* frame_tree = delegate_->GetFrameTree();
1468 1473
1469 frame_tree->ResetForMainFrameSwap(); 1474 frame_tree->ResetForMainFrameSwap();
1470 } 1475 }
1471 1476
1472 void RenderViewHostImpl::SelectWordAroundCaret() { 1477 void RenderViewHostImpl::SelectWordAroundCaret() {
1473 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1478 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1474 } 1479 }
1475 1480
1476 } // namespace content 1481 } // namespace content
OLDNEW
« no previous file with comments | « android_webview/libwebviewchromium.gypi ('k') | ui/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698