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/tab_contents/tab_contents.h" | 5 #include "content/browser/tab_contents/tab_contents.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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 prefs.accelerated_video_enabled = | 426 prefs.accelerated_video_enabled = |
427 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 427 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
428 prefs.partial_swap_enabled = | 428 prefs.partial_swap_enabled = |
429 command_line.HasSwitch(switches::kEnablePartialSwap); | 429 command_line.HasSwitch(switches::kEnablePartialSwap); |
430 prefs.interactive_form_validation_enabled = | 430 prefs.interactive_form_validation_enabled = |
431 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 431 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
432 prefs.fullscreen_enabled = | 432 prefs.fullscreen_enabled = |
433 !command_line.HasSwitch(switches::kDisableFullScreen); | 433 !command_line.HasSwitch(switches::kDisableFullScreen); |
434 prefs.css_regions_enabled = | 434 prefs.css_regions_enabled = |
435 command_line.HasSwitch(switches::kEnableCssRegions); | 435 command_line.HasSwitch(switches::kEnableCssRegions); |
436 | 436 prefs.css_shaders_enabled = |
| 437 command_line.HasSwitch(switches::kEnableCssShaders); |
437 | 438 |
438 #if defined(OS_MACOSX) | 439 #if defined(OS_MACOSX) |
439 bool default_enable_scroll_animator = true; | 440 bool default_enable_scroll_animator = true; |
440 #else | 441 #else |
441 // On CrOS, the launcher always passes in the --enable flag. | 442 // On CrOS, the launcher always passes in the --enable flag. |
442 bool default_enable_scroll_animator = false; | 443 bool default_enable_scroll_animator = false; |
443 #endif | 444 #endif |
444 prefs.enable_scroll_animator = default_enable_scroll_animator; | 445 prefs.enable_scroll_animator = default_enable_scroll_animator; |
445 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) | 446 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) |
446 prefs.enable_scroll_animator = true; | 447 prefs.enable_scroll_animator = true; |
(...skipping 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2591 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2592 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2592 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2593 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2593 // Can be NULL during tests. | 2594 // Can be NULL during tests. |
2594 if (rwh_view) | 2595 if (rwh_view) |
2595 rwh_view->SetSize(GetView()->GetContainerSize()); | 2596 rwh_view->SetSize(GetView()->GetContainerSize()); |
2596 } | 2597 } |
2597 | 2598 |
2598 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { | 2599 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { |
2599 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2600 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2600 } | 2601 } |
OLD | NEW |