| 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/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 #if defined(OS_CHROMEOS) | 501 #if defined(OS_CHROMEOS) |
| 502 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( | 502 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( |
| 503 switches::kDisableGestureTapHighlight); | 503 switches::kDisableGestureTapHighlight); |
| 504 #else | 504 #else |
| 505 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 505 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
| 506 switches::kEnableGestureTapHighlight); | 506 switches::kEnableGestureTapHighlight); |
| 507 #endif | 507 #endif |
| 508 | 508 |
| 509 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 509 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
| 510 | 510 |
| 511 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); | 511 prefs.viewport_meta_enabled = |
| 512 command_line.HasSwitch(switches::kEnableViewportMeta); |
| 513 |
| 514 prefs.viewport_enabled = |
| 515 command_line.HasSwitch(switches::kEnableViewport) || |
| 516 prefs.viewport_meta_enabled; |
| 517 |
| 518 prefs.main_frame_resizes_are_orientation_changes = |
| 519 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
| 512 | 520 |
| 513 prefs.deferred_image_decoding_enabled = | 521 prefs.deferred_image_decoding_enabled = |
| 514 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 522 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
| 515 cc::switches::IsImplSidePaintingEnabled(); | 523 cc::switches::IsImplSidePaintingEnabled(); |
| 516 | 524 |
| 517 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 525 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
| 518 switches::kEnableSpatialNavigation); | 526 switches::kEnableSpatialNavigation); |
| 519 | 527 |
| 520 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); | 528 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); |
| 521 | 529 |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2269 void RenderViewHostImpl::AttachToFrameTree() { | 2277 void RenderViewHostImpl::AttachToFrameTree() { |
| 2270 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2278 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 2271 | 2279 |
| 2272 frame_tree->SwapMainFrame(main_render_frame_host_.get()); | 2280 frame_tree->SwapMainFrame(main_render_frame_host_.get()); |
| 2273 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2281 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
| 2274 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2282 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
| 2275 } | 2283 } |
| 2276 } | 2284 } |
| 2277 | 2285 |
| 2278 } // namespace content | 2286 } // namespace content |
| OLD | NEW |