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

Unified Diff: chrome/browser/ui/views/toolbar/browser_action_view.cc

Issue 114153003: Add an extension bubble explaining which extensions are in dev mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 7 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
Index: chrome/browser/ui/views/toolbar/browser_action_view.cc
diff --git a/chrome/browser/ui/views/toolbar/browser_action_view.cc b/chrome/browser/ui/views/toolbar/browser_action_view.cc
index 14a7bbbb0eae150c6969d9097873edb9372ea48f..8d153390a5ab36da7a091eababe1967d048690d5 100644
--- a/chrome/browser/ui/views/toolbar/browser_action_view.cc
+++ b/chrome/browser/ui/views/toolbar/browser_action_view.cc
@@ -7,9 +7,11 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/api/commands/command_service.h"
+#include "chrome/browser/extensions/dev_mode_bubble_controller.h"
#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/extension_action_manager.h"
#include "chrome/browser/extensions/extension_context_menu_model.h"
+#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -238,7 +240,14 @@ void BrowserActionButton::UpdateState() {
ThemeService* theme =
ThemeServiceFactory::GetForProfile(browser_->profile());
- gfx::ImageSkia bg = *theme->GetImageSkiaNamed(IDR_BROWSER_ACTION);
+ int background_id = IDR_BROWSER_ACTION;
+ extensions::DevModeBubbleController* controller =
+ extensions::DevModeBubbleController::Get(
+ browser_->profile());
+ if (controller->IsDevModeExtension(extension_))
+ background_id = IDR_BROWSER_ACTION_HIGHLIGHT;
+
+ gfx::ImageSkia bg = *theme->GetImageSkiaNamed(background_id);
SetIcon(gfx::ImageSkiaOperations::CreateSuperimposedImage(bg, icon));
gfx::ImageSkia bg_h = *theme->GetImageSkiaNamed(IDR_BROWSER_ACTION_H);

Powered by Google App Engine
This is Rietveld 408576698