| 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 <cmath> | 7 #include <cmath> |
| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 prefs.accelerated_plugins_enabled = | 392 prefs.accelerated_plugins_enabled = |
| 393 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); | 393 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); |
| 394 prefs.accelerated_video_enabled = | 394 prefs.accelerated_video_enabled = |
| 395 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 395 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
| 396 prefs.partial_swap_enabled = | 396 prefs.partial_swap_enabled = |
| 397 command_line.HasSwitch(switches::kEnablePartialSwap); | 397 command_line.HasSwitch(switches::kEnablePartialSwap); |
| 398 prefs.interactive_form_validation_enabled = | 398 prefs.interactive_form_validation_enabled = |
| 399 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 399 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
| 400 prefs.fullscreen_enabled = | 400 prefs.fullscreen_enabled = |
| 401 !command_line.HasSwitch(switches::kDisableFullScreen); | 401 !command_line.HasSwitch(switches::kDisableFullScreen); |
| 402 prefs.css_regions_enabled = |
| 403 command_line.HasSwitch(switches::kEnableCssRegions); |
| 404 |
| 402 | 405 |
| 403 #if defined(OS_MACOSX) | 406 #if defined(OS_MACOSX) |
| 404 bool default_enable_scroll_animator = true; | 407 bool default_enable_scroll_animator = true; |
| 405 #else | 408 #else |
| 406 // On CrOS, the launcher always passes in the --enable flag. | 409 // On CrOS, the launcher always passes in the --enable flag. |
| 407 bool default_enable_scroll_animator = false; | 410 bool default_enable_scroll_animator = false; |
| 408 #endif | 411 #endif |
| 409 prefs.enable_scroll_animator = default_enable_scroll_animator; | 412 prefs.enable_scroll_animator = default_enable_scroll_animator; |
| 410 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) | 413 if (command_line.HasSwitch(switches::kEnableSmoothScrolling)) |
| 411 prefs.enable_scroll_animator = true; | 414 prefs.enable_scroll_animator = true; |
| (...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2471 save_info, | 2474 save_info, |
| 2472 this); | 2475 this); |
| 2473 } | 2476 } |
| 2474 | 2477 |
| 2475 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2478 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2476 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2479 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
| 2477 // Can be NULL during tests. | 2480 // Can be NULL during tests. |
| 2478 if (rwh_view) | 2481 if (rwh_view) |
| 2479 rwh_view->SetSize(GetView()->GetContainerSize()); | 2482 rwh_view->SetSize(GetView()->GetContainerSize()); |
| 2480 } | 2483 } |
| OLD | NEW |