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

Unified Diff: athena/content/web_activity.cc

Issue 524623004: Enabling overscroll/GestureNav for Athena. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/web_activity.cc
diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
index 95ddd35b862b73df8c402a4e2636263b6992e640..e476741b3ae0dcde3f53340af8323337bae21541 100644
--- a/athena/content/web_activity.cc
+++ b/athena/content/web_activity.cc
@@ -7,16 +7,20 @@
#include "athena/activity/public/activity_factory.h"
#include "athena/activity/public/activity_manager.h"
#include "athena/input/public/accelerator_manager.h"
+#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "content/public/common/content_switches.h"
#include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/widget.h"
+
+
sadrul 2014/08/29 19:36:54 Remove blank lines.
mfomitchev 2014/08/29 19:45:16 Done.
namespace athena {
namespace {
@@ -220,6 +224,12 @@ class AthenaWebView : public views::WebView {
return NULL;
}
+ virtual bool CanOverscrollContent() const OVERRIDE {
+ const std::string value = CommandLine::ForCurrentProcess()->
+ GetSwitchValueASCII(switches::kOverscrollHistoryNavigation);
+ return value != "0";
+ }
+
virtual void AddNewContents(content::WebContents* source,
content::WebContents* new_contents,
WindowOpenDisposition disposition,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698