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

Unified Diff: chrome/browser/ui/browser.cc

Issue 9296040: mac: Always do history swiping on the NTP on lion devices with touchpad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable swipes to the left as well Created 8 years, 11 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
« chrome/browser/ui/browser.h ('K') | « chrome/browser/ui/browser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index c54aad042315e4f94c8d9a17b34ff04c0a790cbf..9ab14bc677a680b6c9e842b96aa1b7fdecae30c4 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1493,8 +1493,7 @@ bool Browser::IsClosingPermitted() {
}
bool Browser::CanGoBack() const {
- return GetSelectedTabContentsWrapper()->
- web_contents()->GetController().CanGoBack();
+ return GetSelectedWebContents()->GetController().CanGoBack();
}
void Browser::GoBack(WindowOpenDisposition disposition) {
@@ -1513,8 +1512,7 @@ void Browser::GoBack(WindowOpenDisposition disposition) {
}
bool Browser::CanGoForward() const {
- return GetSelectedTabContentsWrapper()->
- web_contents()->GetController().CanGoForward();
+ return GetSelectedWebContents()->GetController().CanGoForward();
}
void Browser::GoForward(WindowOpenDisposition disposition) {
@@ -1523,6 +1521,11 @@ void Browser::GoForward(WindowOpenDisposition disposition) {
GetOrCloneTabForDisposition(disposition)->GetController().GoForward();
}
+bool Browser::IsOnNtp() const {
+ WebContents* contents = GetSelectedWebContents();
+ return contents && contents->GetURL() == GURL(chrome::kChromeUINewTabURL);
+}
+
void Browser::Reload(WindowOpenDisposition disposition) {
content::RecordAction(UserMetricsAction("Reload"));
ReloadInternal(disposition, false);
« chrome/browser/ui/browser.h ('K') | « chrome/browser/ui/browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698