diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-03 19:28:21 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-03 19:28:21 +0000 |
commit | d545b4502443131d79fa0970802032294d254506 (patch) | |
tree | d09dcd943afef727ea08e2c97ecc7c0c58751419 | |
parent | b92a8dee5d140dc1733d15a0dc3d4d886828467b (diff) | |
download | chromium_src-d545b4502443131d79fa0970802032294d254506.zip chromium_src-d545b4502443131d79fa0970802032294d254506.tar.gz chromium_src-d545b4502443131d79fa0970802032294d254506.tar.bz2 |
gesture nav: Disable gesture nav.
BUG=223664
TBR=joi@chromium.org
Review URL: https://codereview.chromium.org/13537003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192119 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/about_flags.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/browser.cc | 4 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host_impl.cc | 4 | ||||
-rw-r--r-- | content/browser/web_contents/navigation_controller_impl.cc | 4 | ||||
-rw-r--r-- | content/browser/web_contents/web_contents_view_aura.cc | 5 | ||||
-rw-r--r-- | content/browser/web_contents/web_contents_view_aura_browsertest.cc | 4 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 6 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 3 |
8 files changed, 16 insertions, 23 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 5069628..781835f 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -1173,15 +1173,6 @@ const Experiment kExperiments[] = { kOsWin | kOsCrOS | kOsAndroid, SINGLE_VALUE_TYPE(switches::kEnableInteractiveAutocomplete) }, -#if defined(USE_AURA) - { - "disable-overscroll-history-navigation", - IDS_FLAGS_DISABLE_OVERSCROLL_HISTORY_NAVIGATION_NAME, - IDS_FLAGS_DISABLE_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION, - kOsAll, - SINGLE_VALUE_TYPE(switches::kDisableOverscrollHistoryNavigation) - }, -#endif { "enable-touch-drag-drop", IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 4335bc1..88b391a 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1156,8 +1156,8 @@ void Browser::TabStripEmpty() { bool Browser::CanOverscrollContent() const { #if defined(USE_AURA) - bool overscroll_enabled = !CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kDisableOverscrollHistoryNavigation); + bool overscroll_enabled = CommandLine::ForCurrentProcess()-> + HasSwitch(switches::kEnableOverscrollHistoryNavigation); if (!overscroll_enabled) return false; if (is_app() || is_devtools() || !is_type_tabbed()) diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 33ae4ec..67ba418 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -203,8 +203,8 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, BrowserAccessibilityStateImpl::GetInstance()->GetAccessibilityMode(); #if defined(USE_AURA) - bool overscroll_enabled = !CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kDisableOverscrollHistoryNavigation); + bool overscroll_enabled = CommandLine::ForCurrentProcess()-> + HasSwitch(switches::kEnableOverscrollHistoryNavigation); SetOverscrollControllerEnabled(overscroll_enabled); #endif } diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc index 9cf6ac2..184402e 100644 --- a/content/browser/web_contents/navigation_controller_impl.cc +++ b/content/browser/web_contents/navigation_controller_impl.cc @@ -480,8 +480,8 @@ int NavigationControllerImpl::GetIndexForOffset(int offset) const { } void NavigationControllerImpl::TakeScreenshot() { - static bool overscroll_enabled = !CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kDisableOverscrollHistoryNavigation); + static bool overscroll_enabled = CommandLine::ForCurrentProcess()-> + HasSwitch(switches::kEnableOverscrollHistoryNavigation); if (!overscroll_enabled) return; diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index d192887..6fcf61e 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -1257,9 +1257,8 @@ RenderWidgetHostView* WebContentsViewAura::CreateViewForWidget( RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(render_widget_host); - if (host_impl->overscroll_controller() && - (!web_contents_->GetDelegate() || - web_contents_->GetDelegate()->CanOverscrollContent())) { + if (host_impl->overscroll_controller() && web_contents_->GetDelegate() && + web_contents_->GetDelegate()->CanOverscrollContent()) { host_impl->overscroll_controller()->set_delegate(this); if (!navigation_overlay_.get()) navigation_overlay_.reset(new OverscrollNavigationOverlay()); diff --git a/content/browser/web_contents/web_contents_view_aura_browsertest.cc b/content/browser/web_contents/web_contents_view_aura_browsertest.cc index ba37635..8e4d817 100644 --- a/content/browser/web_contents/web_contents_view_aura_browsertest.cc +++ b/content/browser/web_contents/web_contents_view_aura_browsertest.cc @@ -68,6 +68,10 @@ class WebContentsViewAuraTest : public ContentBrowserTest { public: WebContentsViewAuraTest() {} + virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { + command_line->AppendSwitch(switches::kEnableOverscrollHistoryNavigation); + } + // Executes the javascript synchronously and makes sure the returned value is // freed properly. void ExecuteSyncJSFunction(RenderViewHost* rvh, const std::string& jscript) { diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 272793f..755a2c5 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -767,8 +767,8 @@ const char kEnableDeferredImageDecoding[] = "enable-deferred-image-decoding"; // Use a vsync signal from the browser to the renderer to schedule rendering. const char kEnableVsyncNotification[] = "enable-vsync-notification"; -// Disables history navigation in response to horizontal overscroll. -const char kDisableOverscrollHistoryNavigation[] = - "disable-overscroll-history-navigation"; +// Enables history navigation in response to horizontal overscroll. +const char kEnableOverscrollHistoryNavigation[] = + "enable-overscroll-history-navigation"; } // namespace switches diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index eb0a94c..7d1b4eb 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -212,6 +212,7 @@ CONTENT_EXPORT extern const char kEnableFixedPositionCreatesStackingContext[]; CONTENT_EXPORT extern const char kDisableFixedPositionCreatesStackingContext[]; CONTENT_EXPORT extern const char kEnableDeferredImageDecoding[]; CONTENT_EXPORT extern const char kEnableVsyncNotification[]; +CONTENT_EXPORT extern const char kEnableOverscrollHistoryNavigation[]; extern const char kEnableVisualWordMovement[]; CONTENT_EXPORT extern const char kUseMobileUserAgent[]; @@ -239,8 +240,6 @@ extern const char kDisableCarbonInterposing[]; CONTENT_EXPORT extern const char kTestCompositor[]; #endif -CONTENT_EXPORT extern const char kDisableOverscrollHistoryNavigation[]; - } // namespace switches #endif // CONTENT_PUBLIC_COMMON_CONTENT_SWITCHES_H_ |