OLD | NEW |
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 !command_line.HasSwitch(switches::kDisableThreadedAnimation); | 422 !command_line.HasSwitch(switches::kDisableThreadedAnimation); |
423 prefs.accelerated_painting_enabled = | 423 prefs.accelerated_painting_enabled = |
424 GpuProcessHost::gpu_enabled() && | 424 GpuProcessHost::gpu_enabled() && |
425 command_line.HasSwitch(switches::kEnableAcceleratedPainting); | 425 command_line.HasSwitch(switches::kEnableAcceleratedPainting); |
426 prefs.accelerated_filters_enabled = | 426 prefs.accelerated_filters_enabled = |
427 GpuProcessHost::gpu_enabled() && | 427 GpuProcessHost::gpu_enabled() && |
428 command_line.HasSwitch(switches::kEnableAcceleratedFilters); | 428 command_line.HasSwitch(switches::kEnableAcceleratedFilters); |
429 prefs.accelerated_layers_enabled = | 429 prefs.accelerated_layers_enabled = |
430 prefs.accelerated_animation_enabled = | 430 prefs.accelerated_animation_enabled = |
431 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 431 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
432 prefs.composite_to_texture_enabled = | |
433 command_line.HasSwitch(switches::kEnableCompositeToTexture); | |
434 prefs.accelerated_plugins_enabled = | 432 prefs.accelerated_plugins_enabled = |
435 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 433 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); |
436 prefs.accelerated_video_enabled = | 434 prefs.accelerated_video_enabled = |
437 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 435 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
438 prefs.partial_swap_enabled = | 436 prefs.partial_swap_enabled = |
439 command_line.HasSwitch(switches::kEnablePartialSwap); | 437 command_line.HasSwitch(switches::kEnablePartialSwap); |
440 prefs.interactive_form_validation_enabled = | 438 prefs.interactive_form_validation_enabled = |
441 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 439 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
442 prefs.fullscreen_enabled = | 440 prefs.fullscreen_enabled = |
443 !command_line.HasSwitch(switches::kDisableFullScreen); | 441 !command_line.HasSwitch(switches::kDisableFullScreen); |
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2615 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2613 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2616 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2614 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2617 // Can be NULL during tests. | 2615 // Can be NULL during tests. |
2618 if (rwh_view) | 2616 if (rwh_view) |
2619 rwh_view->SetSize(GetView()->GetContainerSize()); | 2617 rwh_view->SetSize(GetView()->GetContainerSize()); |
2620 } | 2618 } |
2621 | 2619 |
2622 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 2620 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { |
2623 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2621 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2624 } | 2622 } |
OLD | NEW |