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

Unified Diff: chrome/browser/ui/views/location_bar/star_view.cc

Issue 765043002: Bookmark pop-up doesn't open if Ctrl+D is set as keyboard shortcut for added extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 6 years 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.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/views/location_bar/star_view.cc
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index b5627a0735b8f05de2d9878e4d76c22a671103dd..368119d2ce84df528fcfa8049fbf495bf7cb636b 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -8,6 +8,8 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/bookmarks/bookmark_stats.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
#include "chrome/grit/generated_resources.h"
@@ -15,8 +17,8 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
-StarView::StarView(CommandUpdater* command_updater)
- : BubbleIconView(command_updater, IDC_BOOKMARK_PAGE) {
+StarView::StarView(CommandUpdater* command_updater, Browser* browser)
+ : BubbleIconView(command_updater, IDC_BOOKMARK_PAGE), browser_(browser) {
set_id(VIEW_ID_STAR_BUTTON);
SetToggled(false);
}
@@ -52,3 +54,12 @@ void StarView::OnExecuting(
entry_point,
BOOKMARK_ENTRY_POINT_LIMIT);
}
+
+void StarView::ExecuteCommand(ExecuteSource source) {
+ if (browser_) {
+ OnExecuting(source);
+ chrome::BookmarkCurrentPageIgnoringExtensionOverrides(browser_);
+ } else {
+ BubbleIconView::ExecuteCommand(source);
+ }
+}
« no previous file with comments | « chrome/browser/ui/views/location_bar/star_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698