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

Unified Diff: chrome/browser/ui/views/extensions/extension_installed_bubble.cc

Issue 10201016: Conflict detection for Extension Keybinding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressed comments Created 8 years, 8 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/views/extensions/extension_installed_bubble.cc
===================================================================
--- chrome/browser/ui/views/extensions/extension_installed_bubble.cc (revision 134889)
+++ chrome/browser/ui/views/extensions/extension_installed_bubble.cc (working copy)
@@ -11,6 +11,8 @@
#include "base/i18n/rtl.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/extensions/extension_command_service.h"
+#include "chrome/browser/extensions/extension_command_service_factory.h"
#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -142,8 +144,11 @@
switch (type_) {
case ExtensionInstalledBubble::BROWSER_ACTION: {
+ ExtensionCommandService* command_service =
+ ExtensionCommandServiceFactory::GetForProfile(
+ browser_->profile());
const Extension::ExtensionKeybinding* browser_action_command =
- extension->browser_action_command();
+ command_service->GetActiveBrowserActionCommand(extension->id());
if (!browser_action_command) {
info_ = new views::Label(l10n_util::GetStringUTF16(
IDS_EXTENSION_INSTALLED_BROWSER_ACTION_INFO));
@@ -153,6 +158,7 @@
IDS_EXTENSION_INSTALLED_BROWSER_ACTION_INFO_WITH_SHORTCUT,
browser_action_command->accelerator().GetShortcutText()));
}
+
info_->SetFont(font);
info_->SetMultiLine(true);
info_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
@@ -160,8 +166,11 @@
break;
}
case ExtensionInstalledBubble::PAGE_ACTION: {
+ ExtensionCommandService* command_service =
+ ExtensionCommandServiceFactory::GetForProfile(
+ browser_->profile());
const Extension::ExtensionKeybinding* page_action_command =
- extension->page_action_command();
+ command_service->GetActivePageActionCommand(extension->id());
if (!page_action_command) {
info_ = new views::Label(l10n_util::GetStringUTF16(
IDS_EXTENSION_INSTALLED_PAGE_ACTION_INFO));

Powered by Google App Engine
This is Rietveld 408576698