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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); | 507 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
508 | 508 |
509 prefs.deferred_image_decoding_enabled = | 509 prefs.deferred_image_decoding_enabled = |
510 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 510 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
511 content::IsImplSidePaintingEnabled(); | 511 content::IsImplSidePaintingEnabled(); |
512 | 512 |
513 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 513 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
514 switches::kEnableSpatialNavigation); | 514 switches::kEnableSpatialNavigation); |
515 | 515 |
516 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); | 516 GetContentClient()->browser()->OverrideWebkitPrefs(this, url, &prefs); |
517 | |
518 // Disable compositing in guests until we have compositing path implemented | |
519 // for guests. | |
520 bool guest_compositing_enabled = !command_line.HasSwitch( | |
521 switches::kDisableBrowserPluginCompositing); | |
522 if (GetProcess()->IsGuest() && !guest_compositing_enabled) { | |
523 prefs.force_compositing_mode = false; | |
524 prefs.accelerated_compositing_enabled = false; | |
525 } | |
526 | |
527 return prefs; | 517 return prefs; |
528 } | 518 } |
529 | 519 |
530 void RenderViewHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { | 520 void RenderViewHostImpl::Navigate(const FrameMsg_Navigate_Params& params) { |
531 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); | 521 TRACE_EVENT0("renderer_host", "RenderViewHostImpl::Navigate"); |
532 delegate_->GetFrameTree()->GetMainFrame()->Navigate(params); | 522 delegate_->GetFrameTree()->GetMainFrame()->Navigate(params); |
533 } | 523 } |
534 | 524 |
535 void RenderViewHostImpl::NavigateToURL(const GURL& url) { | 525 void RenderViewHostImpl::NavigateToURL(const GURL& url) { |
536 delegate_->GetFrameTree()->GetMainFrame()->NavigateToURL(url); | 526 delegate_->GetFrameTree()->GetMainFrame()->NavigateToURL(url); |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 return true; | 1840 return true; |
1851 } | 1841 } |
1852 | 1842 |
1853 void RenderViewHostImpl::AttachToFrameTree() { | 1843 void RenderViewHostImpl::AttachToFrameTree() { |
1854 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1844 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1855 | 1845 |
1856 frame_tree->ResetForMainFrameSwap(); | 1846 frame_tree->ResetForMainFrameSwap(); |
1857 } | 1847 } |
1858 | 1848 |
1859 } // namespace content | 1849 } // namespace content |
OLD | NEW |