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

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 this patch applicable to the latest trunk Created 9 years, 6 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..895aa22faf72a6fab202d3f205f11aa177b86d15 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
#include "base/string_number_conversions.h"
+#include "chrome/browser/event_disposition.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.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))) {
+ WindowOpenDisposition disposition = browser::DispositionFromEventFlags(flags);
+ if (!browser_->NavigateToIndexWithDisposition(controller_index, disposition))
NOTREACHED();
- }
}
void BackForwardMenuModel::MenuWillShow() {
« no previous file with comments | « chrome/browser/ui/toolbar/back_forward_menu_model.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698