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

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

Issue 11938025: ChromeOS default switches cleanup - switches::kEnableThreadedCompositing and switches::kEnableSmoot… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | no next file » | 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/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/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 29 matching lines...) Expand all
40 #include "content/browser/webui/web_ui_impl.h" 40 #include "content/browser/webui/web_ui_impl.h"
41 #include "content/common/browser_plugin_messages.h" 41 #include "content/common/browser_plugin_messages.h"
42 #include "content/common/icon_messages.h" 42 #include "content/common/icon_messages.h"
43 #include "content/common/intents_messages.h" 43 #include "content/common/intents_messages.h"
44 #include "content/common/ssl_status_serialization.h" 44 #include "content/common/ssl_status_serialization.h"
45 #include "content/common/view_messages.h" 45 #include "content/common/view_messages.h"
46 #include "content/port/browser/render_view_host_delegate_view.h" 46 #include "content/port/browser/render_view_host_delegate_view.h"
47 #include "content/port/browser/render_widget_host_view_port.h" 47 #include "content/port/browser/render_widget_host_view_port.h"
48 #include "content/public/browser/browser_context.h" 48 #include "content/public/browser/browser_context.h"
49 #include "content/public/browser/color_chooser.h" 49 #include "content/public/browser/color_chooser.h"
50 #include "content/public/browser/compositor_util.h"
50 #include "content/public/browser/content_browser_client.h" 51 #include "content/public/browser/content_browser_client.h"
51 #include "content/public/browser/devtools_agent_host.h" 52 #include "content/public/browser/devtools_agent_host.h"
52 #include "content/public/browser/download_manager.h" 53 #include "content/public/browser/download_manager.h"
53 #include "content/public/browser/download_url_parameters.h" 54 #include "content/public/browser/download_url_parameters.h"
54 #include "content/public/browser/invalidate_type.h" 55 #include "content/public/browser/invalidate_type.h"
55 #include "content/public/browser/javascript_dialogs.h" 56 #include "content/public/browser/javascript_dialogs.h"
56 #include "content/public/browser/load_from_memory_cache_details.h" 57 #include "content/public/browser/load_from_memory_cache_details.h"
57 #include "content/public/browser/load_notification_details.h" 58 #include "content/public/browser/load_notification_details.h"
58 #include "content/public/browser/navigation_details.h" 59 #include "content/public/browser/navigation_details.h"
59 #include "content/public/browser/notification_details.h" 60 #include "content/public/browser/notification_details.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 prefs.composited_scrolling_for_frames_enabled = 479 prefs.composited_scrolling_for_frames_enabled =
479 command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames); 480 command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames);
480 prefs.show_paint_rects = 481 prefs.show_paint_rects =
481 command_line.HasSwitch(switches::kShowPaintRects); 482 command_line.HasSwitch(switches::kShowPaintRects);
482 prefs.render_vsync_enabled = 483 prefs.render_vsync_enabled =
483 !command_line.HasSwitch(switches::kDisableGpuVsync); 484 !command_line.HasSwitch(switches::kDisableGpuVsync);
484 prefs.accelerated_compositing_enabled = 485 prefs.accelerated_compositing_enabled =
485 GpuProcessHost::gpu_enabled() && 486 GpuProcessHost::gpu_enabled() &&
486 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 487 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
487 prefs.force_compositing_mode = 488 prefs.force_compositing_mode =
488 command_line.HasSwitch(switches::kForceCompositingMode) && 489 content::IsForceCompositingModeEnabled() &&
489 !command_line.HasSwitch(switches::kDisableForceCompositingMode); 490 !command_line.HasSwitch(switches::kDisableForceCompositingMode);
490 prefs.fixed_position_compositing_enabled = 491 prefs.fixed_position_compositing_enabled =
491 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); 492 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
492 prefs.accelerated_2d_canvas_enabled = 493 prefs.accelerated_2d_canvas_enabled =
493 GpuProcessHost::gpu_enabled() && 494 GpuProcessHost::gpu_enabled() &&
494 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 495 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
495 prefs.deferred_2d_canvas_enabled = 496 prefs.deferred_2d_canvas_enabled =
496 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas); 497 !command_line.HasSwitch(switches::kDisableDeferred2dCanvas);
497 prefs.antialiased_2d_canvas_disabled = 498 prefs.antialiased_2d_canvas_disabled =
498 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); 499 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 } 547 }
547 548
548 prefs.device_supports_touch = prefs.touch_enabled && touch_device_present; 549 prefs.device_supports_touch = prefs.touch_enabled && touch_device_present;
549 #if defined(OS_ANDROID) 550 #if defined(OS_ANDROID)
550 prefs.device_supports_mouse = false; 551 prefs.device_supports_mouse = false;
551 #endif 552 #endif
552 553
553 prefs.touch_adjustment_enabled = 554 prefs.touch_adjustment_enabled =
554 !command_line.HasSwitch(switches::kDisableTouchAdjustment); 555 !command_line.HasSwitch(switches::kDisableTouchAdjustment);
555 556
556 #if defined(OS_MACOSX) 557 #if defined(OS_MACOSX) || defined(OS_CHROMEOS)
557 bool default_enable_scroll_animator = true; 558 bool default_enable_scroll_animator = true;
558 #else 559 #else
559 // On CrOS, the launcher always passes in the --enable flag.
560 bool default_enable_scroll_animator = false; 560 bool default_enable_scroll_animator = false;
561 #endif 561 #endif
562 prefs.enable_scroll_animator = default_enable_scroll_animator; 562 prefs.enable_scroll_animator = default_enable_scroll_animator;
563 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) 563 if (command_line.HasSwitch(switches::kEnableSmoothScrolling))
564 prefs.enable_scroll_animator = true; 564 prefs.enable_scroll_animator = true;
565 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) 565 if (command_line.HasSwitch(switches::kDisableSmoothScrolling))
566 prefs.enable_scroll_animator = false; 566 prefs.enable_scroll_animator = false;
567 567
568 prefs.visual_word_movement_enabled = 568 prefs.visual_word_movement_enabled =
569 command_line.HasSwitch(switches::kEnableVisualWordMovement); 569 command_line.HasSwitch(switches::kEnableVisualWordMovement);
(...skipping 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after
3425 3425
3426 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3426 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3427 return browser_plugin_guest_.get(); 3427 return browser_plugin_guest_.get();
3428 } 3428 }
3429 3429
3430 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3430 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3431 return browser_plugin_embedder_.get(); 3431 return browser_plugin_embedder_.get();
3432 } 3432 }
3433 3433
3434 } // namespace content 3434 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698