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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); | 520 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); |
521 | 521 |
522 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 522 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
523 GetProcess()->GetID())) { | 523 GetProcess()->GetID())) { |
524 prefs.loads_images_automatically = true; | 524 prefs.loads_images_automatically = true; |
525 prefs.javascript_enabled = true; | 525 prefs.javascript_enabled = true; |
526 } | 526 } |
527 | 527 |
528 prefs.is_online = !net::NetworkChangeNotifier::IsOffline(); | 528 prefs.is_online = !net::NetworkChangeNotifier::IsOffline(); |
529 | 529 |
530 #if !defined(USE_AURA) | |
531 // Force accelerated compositing and 2d canvas off for chrome: and about: | |
532 // pages (unless it's specifically allowed). | |
533 if ((url.SchemeIs(kChromeUIScheme) || | |
534 (url.SchemeIs(chrome::kAboutScheme) && url.spec() != kAboutBlankURL)) && | |
535 !command_line.HasSwitch(switches::kAllowWebUICompositing)) { | |
536 prefs.accelerated_compositing_enabled = false; | |
537 prefs.accelerated_2d_canvas_enabled = false; | |
538 } | |
539 #endif | |
540 | |
541 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 530 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
542 switches::kDisableFixedPositionCreatesStackingContext); | 531 switches::kDisableFixedPositionCreatesStackingContext); |
543 | 532 |
544 #if defined(OS_CHROMEOS) | 533 #if defined(OS_CHROMEOS) |
545 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( | 534 prefs.gesture_tap_highlight_enabled = !command_line.HasSwitch( |
546 switches::kDisableGestureTapHighlight); | 535 switches::kDisableGestureTapHighlight); |
547 #else | 536 #else |
548 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 537 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
549 switches::kEnableGestureTapHighlight); | 538 switches::kEnableGestureTapHighlight); |
550 #endif | 539 #endif |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 void RenderViewHostImpl::AttachToFrameTree() { | 2150 void RenderViewHostImpl::AttachToFrameTree() { |
2162 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2151 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2163 | 2152 |
2164 frame_tree->ResetForMainFrameSwap(); | 2153 frame_tree->ResetForMainFrameSwap(); |
2165 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2154 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2166 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2155 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2167 } | 2156 } |
2168 } | 2157 } |
2169 | 2158 |
2170 } // namespace content | 2159 } // namespace content |
OLD | NEW |