From 03ce2f5bf335b39ad24306a3a962823e46305cc4 Mon Sep 17 00:00:00 2001 From: "brettw@google.com" Date: Fri, 22 May 2009 18:15:16 +0000 Subject: Middle clicking on a bookmark from the bookmark manager now opens that bookmark in a new foreground tab. http://crbug.com/7788 Checked in for Meelap Shah Original review = http://codereview.chromium.org/115665 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16760 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/bookmark_manager_view.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'chrome/browser/views/bookmark_manager_view.cc') diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc index 25cddc0..a66c105 100644 --- a/chrome/browser/views/bookmark_manager_view.cc +++ b/chrome/browser/views/bookmark_manager_view.cc @@ -347,6 +347,19 @@ void BookmarkManagerView::OnDoubleClick() { GetWidget()->GetNativeView(), profile_, NULL, nodes, CURRENT_TAB); } +void BookmarkManagerView::OnMiddleClick() { + std::vector nodes = GetSelectedTableNodes(); + if (nodes.empty()) + return; + if (nodes.size() == 1 && nodes[0]->is_folder()) { + // Middle clicking on a folder results in no action. + return; + } + + bookmark_utils::OpenAll( + GetWidget()->GetNativeView(), profile_, NULL, nodes, NEW_FOREGROUND_TAB); +} + void BookmarkManagerView::OnTableViewDelete(views::TableView* table) { std::vector nodes = GetSelectedTableNodes(); if (nodes.empty()) -- cgit v1.1