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

Unified Diff: chrome/browser/ui/toolbar/action_box_menu_model.cc

Issue 12095023: Allow platform apps to add themselves to the Action Box. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use raw pointer + IconImage signature changed Created 7 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/toolbar/action_box_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/action_box_menu_model.cc b/chrome/browser/ui/toolbar/action_box_menu_model.cc
index b095792a33c071e33b20047e7be82af0aa8354a0..973b61bae4f238b6c0cbe87ce9f109de756db87d 100644
--- a/chrome/browser/ui/toolbar/action_box_menu_model.cc
+++ b/chrome/browser/ui/toolbar/action_box_menu_model.cc
@@ -18,11 +18,14 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_command_controller.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/common/extensions/api/extension_action/action_info.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/resource_bundle.h"
+using extensions::ActionInfo;
+
////////////////////////////////////////////////////////////////////////////////
// ActionBoxMenuModel
@@ -56,7 +59,9 @@ void ActionBoxMenuModel::AddExtension(const extensions::Extension& extension,
if (extension_ids_.empty())
AddSeparator(ui::NORMAL_SEPARATOR);
extension_ids_.push_back(extension.id());
- AddItem(command_id, UTF8ToUTF16(extension.name()));
+ const ActionInfo* page_launcher_info =
+ ActionInfo::GetPageLauncherInfo(&extension);
+ AddItem(command_id, UTF8ToUTF16(page_launcher_info->default_title));
}
bool ActionBoxMenuModel::IsItemExtension(int index) {
« no previous file with comments | « chrome/browser/ui/toolbar/action_box_button_controller.cc ('k') | chrome/browser/ui/views/action_box_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698