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

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

Issue 2421913002: Change Aura overlay scrollbars from solid color to painted scrollbars. (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | content/renderer/gpu/render_widget_compositor.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) 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); 457 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing);
458 prefs.antialiased_clips_2d_canvas_enabled = 458 prefs.antialiased_clips_2d_canvas_enabled =
459 !command_line.HasSwitch(switches::kDisable2dCanvasClipAntialiasing); 459 !command_line.HasSwitch(switches::kDisable2dCanvasClipAntialiasing);
460 prefs.accelerated_2d_canvas_msaa_sample_count = 460 prefs.accelerated_2d_canvas_msaa_sample_count =
461 atoi(command_line.GetSwitchValueASCII( 461 atoi(command_line.GetSwitchValueASCII(
462 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); 462 switches::kAcceleratedCanvas2dMSAASampleCount).c_str());
463 463
464 prefs.inert_visual_viewport = 464 prefs.inert_visual_viewport =
465 command_line.HasSwitch(switches::kInertVisualViewport); 465 command_line.HasSwitch(switches::kInertVisualViewport);
466 466
467 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); 467 prefs.use_solid_color_scrollbars = false;
468 468
469 prefs.history_entry_requires_user_gesture = 469 prefs.history_entry_requires_user_gesture =
470 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture); 470 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture);
471 471
472 #if defined(OS_ANDROID) 472 #if defined(OS_ANDROID)
473 // On Android, user gestures are normally required, unless that requirement 473 // On Android, user gestures are normally required, unless that requirement
474 // is disabled with a command-line switch or the equivalent field trial is 474 // is disabled with a command-line switch or the equivalent field trial is
475 // is set to "Enabled". 475 // is set to "Enabled".
476 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( 476 const std::string autoplay_group_name = base::FieldTrialList::FindFullName(
477 "MediaElementAutoplay"); 477 "MediaElementAutoplay");
478 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( 478 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
479 switches::kDisableGestureRequirementForMediaPlayback) && 479 switches::kDisableGestureRequirementForMediaPlayback) &&
480 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); 480 (autoplay_group_name.empty() || autoplay_group_name != "Enabled");
481 prefs.autoplay_muted_videos_enabled = 481 prefs.autoplay_muted_videos_enabled =
482 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos); 482 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos);
483 483
484 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); 484 prefs.progress_bar_completion = GetProgressBarCompletionPolicy();
485
486 prefs.use_solid_color_scrollbars = true;
485 #endif 487 #endif
486 488
487 // Handle autoplay gesture override experiment. 489 // Handle autoplay gesture override experiment.
488 // Note that anything but a well-formed string turns the experiment off. 490 // Note that anything but a well-formed string turns the experiment off.
489 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( 491 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName(
490 "MediaElementGestureOverrideExperiment"); 492 "MediaElementGestureOverrideExperiment");
491 493
492 prefs.touch_enabled = ui::AreTouchEventsEnabled(); 494 prefs.touch_enabled = ui::AreTouchEventsEnabled();
493 prefs.device_supports_touch = prefs.touch_enabled && 495 prefs.device_supports_touch = prefs.touch_enabled &&
494 ui::GetTouchScreensAvailability() == 496 ui::GetTouchScreensAvailability() ==
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 // Note: We are using the origin URL provided by the sender here. It may be 1315 // Note: We are using the origin URL provided by the sender here. It may be
1314 // different from the receiver's. 1316 // different from the receiver's.
1315 file_system_file.url = 1317 file_system_file.url =
1316 GURL(storage::GetIsolatedFileSystemRootURIString( 1318 GURL(storage::GetIsolatedFileSystemRootURIString(
1317 file_system_url.origin(), filesystem_id, std::string()) 1319 file_system_url.origin(), filesystem_id, std::string())
1318 .append(register_name)); 1320 .append(register_name));
1319 } 1321 }
1320 } 1322 }
1321 1323
1322 } // namespace content 1324 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698