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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 26809004: Add a flag for enabling/disabling the new accelerated scrolling path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 525 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
526 prefs.allow_file_access_from_file_urls = 526 prefs.allow_file_access_from_file_urls =
527 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 527 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
528 528
529 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; 529 prefs.accelerated_compositing_for_overflow_scroll_enabled = false;
530 if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll)) 530 if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll))
531 prefs.accelerated_compositing_for_overflow_scroll_enabled = true; 531 prefs.accelerated_compositing_for_overflow_scroll_enabled = true;
532 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll)) 532 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll))
533 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; 533 prefs.accelerated_compositing_for_overflow_scroll_enabled = false;
534 534
535 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = false;
536 if (command_line.HasSwitch(
537 switches::kEnableUniversalAcceleratedOverflowScroll))
538 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = true;
539 if (command_line.HasSwitch(
540 switches::kDisableUniversalAcceleratedOverflowScroll))
541 prefs.universal_accelerated_compositing_for_overflow_scroll_enabled = false;
542
535 prefs.accelerated_compositing_for_scrollable_frames_enabled = false; 543 prefs.accelerated_compositing_for_scrollable_frames_enabled = false;
536 if (command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames)) 544 if (command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames))
537 prefs.accelerated_compositing_for_scrollable_frames_enabled = true; 545 prefs.accelerated_compositing_for_scrollable_frames_enabled = true;
538 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames)) 546 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames))
539 prefs.accelerated_compositing_for_scrollable_frames_enabled = false; 547 prefs.accelerated_compositing_for_scrollable_frames_enabled = false;
540 548
541 prefs.composited_scrolling_for_frames_enabled = false; 549 prefs.composited_scrolling_for_frames_enabled = false;
542 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames)) 550 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames))
543 prefs.composited_scrolling_for_frames_enabled = true; 551 prefs.composited_scrolling_for_frames_enabled = true;
544 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames)) 552 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames))
(...skipping 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after
3834 } 3842 }
3835 3843
3836 void WebContentsImpl::OnFrameRemoved( 3844 void WebContentsImpl::OnFrameRemoved(
3837 RenderViewHostImpl* render_view_host, 3845 RenderViewHostImpl* render_view_host,
3838 int64 frame_id) { 3846 int64 frame_id) {
3839 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3847 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3840 FrameDetached(render_view_host, frame_id)); 3848 FrameDetached(render_view_host, frame_id));
3841 } 3849 }
3842 3850
3843 } // namespace content 3851 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698