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

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

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make event_utils::DispositionFromEventFlags not view-specific. Created 9 years, 7 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/toolbar/back_forward_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 71e78c5c12b2e10888a5ec7074af34b05aed1bf3..f4435b54e17b38e9f11b3e9f38f57083eb7c8961 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_back_forward_navigator.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/navigation_controller.h"
@@ -153,11 +154,10 @@ void BackForwardMenuModel::HighlightChangedTo(int index) {
}
void BackForwardMenuModel::ActivatedAt(int index) {
- ActivatedAtWithDisposition(index, CURRENT_TAB);
+ ActivatedAtWithFlags(index, 0);
}
-void BackForwardMenuModel::ActivatedAtWithDisposition(
- int index, int disposition) {
+void BackForwardMenuModel::ActivatedAtWithFlags(int index, int flags) {
DCHECK(!IsSeparator(index));
// Execute the command for the last item: "Show Full History".
@@ -177,10 +177,9 @@ void BackForwardMenuModel::ActivatedAtWithDisposition(
}
int controller_index = MenuIndexToNavEntryIndex(index);
- if (!browser_->NavigateToIndexWithDisposition(
- controller_index, static_cast<WindowOpenDisposition>(disposition))) {
- NOTREACHED();
- }
+
+ browser::BrowserBackForwardNavigator::NavigateToIndex(
+ browser_, controller_index, flags);
}
void BackForwardMenuModel::MenuWillShow() {

Powered by Google App Engine
This is Rietveld 408576698