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

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

Issue 143493005: Allow extensions to remove and override the bookmark shortcut key (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/gtk/accelerator_utils_gtk.cc
diff --git a/chrome/browser/ui/gtk/accelerator_utils_gtk.cc b/chrome/browser/ui/gtk/accelerator_utils_gtk.cc
index 0a83cdf0eb1176ec88ad5787cd31ad35369e43ff..07fd5422ad3eca5b5c02277b1086c122366255ab 100644
--- a/chrome/browser/ui/gtk/accelerator_utils_gtk.cc
+++ b/chrome/browser/ui/gtk/accelerator_utils_gtk.cc
@@ -20,4 +20,12 @@ bool IsChromeAccelerator(const ui::Accelerator& accelerator, Profile* profile) {
return false;
}
+ui::Accelerator GetChromeAcceleratorForCommandId(int command_id) {
+ AcceleratorsGtk* accelerators = AcceleratorsGtk::GetInstance();
+ const ui::Accelerator* accelerator =
+ accelerators->GetPrimaryAcceleratorForCommand(command_id);
+
+ return accelerator ? *accelerator : ui::Accelerator();
+}
+
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698