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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc

Issue 10092017: Mac: Prevent NTP mousewheel events from being suppressed on Lion. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
index e9ee7bfabdf04538a8b54ee01d522d3979da30a8..54b53192c2e5be47df24b8a5fd647df771991138 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
@@ -23,6 +23,10 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(OS_MACOSX)
Patrick Dubroy 2012/04/16 21:27:59 Whoops. There should be no changes in this file.
+#include "base/mac/mac_util.h"
+#endif
+
static const int kIntroDisplayMax = 10;
// The URL of a knowledge-base article about the new NTP.
@@ -190,6 +194,19 @@ void NewTabPageHandler::GetLocalizedValues(Profile* profile,
l10n_util::GetStringUTF16(IDS_LEARN_MORE));
}
#endif
+
+ LOG(WARNING) << "*********** ntp load";
+
+ // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or
+ // forward gesture. Pass through a flag that indicates whether or not that
+ // feature is enabled.
+#if defined(OS_MACOSX)
+ values->SetBoolean("isSwipeTrackingFromScrollEventsEnabled",
+ base::mac::IsSwipeTrackingFromScrollEventsEnabled());
+#else
+ values->SetBoolean("isSwipeTrackingFromScrollEventsEnabled",
+ false);
+#endif
}
// static

Powered by Google App Engine
This is Rietveld 408576698