Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 14110006: add --enable-spatial-navigation flag for testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 #endif 590 #endif
591 591
592 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); 592 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors();
593 593
594 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); 594 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport);
595 595
596 prefs.deferred_image_decoding_enabled = 596 prefs.deferred_image_decoding_enabled =
597 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || 597 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) ||
598 cc::switches::IsImplSidePaintingEnabled(); 598 cc::switches::IsImplSidePaintingEnabled();
599 599
600 prefs.spatial_navigation_enabled = command_line.HasSwitch(
601 switches::kEnableSpatialNavigation);
602
600 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); 603 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs);
601 604
602 // Disable compositing in guests until we have compositing path implemented 605 // Disable compositing in guests until we have compositing path implemented
603 // for guests. 606 // for guests.
604 bool guest_compositing_enabled = !command_line.HasSwitch( 607 bool guest_compositing_enabled = !command_line.HasSwitch(
605 switches::kDisableBrowserPluginCompositing); 608 switches::kDisableBrowserPluginCompositing);
606 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { 609 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) {
607 prefs.force_compositing_mode = false; 610 prefs.force_compositing_mode = false;
608 prefs.accelerated_compositing_enabled = false; 611 prefs.accelerated_compositing_enabled = false;
609 } 612 }
(...skipping 2837 matching lines...) Expand 10 before | Expand all | Expand 10 after
3447 } 3450 }
3448 3451
3449 BrowserPluginGuestManager* 3452 BrowserPluginGuestManager*
3450 WebContentsImpl::GetBrowserPluginGuestManager() const { 3453 WebContentsImpl::GetBrowserPluginGuestManager() const {
3451 return static_cast<BrowserPluginGuestManager*>( 3454 return static_cast<BrowserPluginGuestManager*>(
3452 GetBrowserContext()->GetUserData( 3455 GetBrowserContext()->GetUserData(
3453 browser_plugin::kBrowserPluginGuestManagerKeyName)); 3456 browser_plugin::kBrowserPluginGuestManagerKeyName));
3454 } 3457 }
3455 3458
3456 } // namespace content 3459 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698