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

Unified Diff: chrome/browser/extensions/extension_tab_helper.cc

Issue 9590001: Launch panels as popup windows in Aura, and add separate launcher icon logic for panels. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Eliminate ash::TYPE_PANEL Created 8 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/extensions/extension_tab_helper.cc
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index 6ec0221e59a84f62b5a5a49e9757a8cdf9d1851b..ae1be4dc89a97e32c76654db654d96f95efaf82e 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -64,23 +64,36 @@ void ExtensionTabHelper::SetExtensionApp(const Extension* extension) {
content::NotificationService::NoDetails());
}
-void ExtensionTabHelper::SetExtensionAppById(
+const Extension* ExtensionTabHelper::GetExtension(
sky 2012/03/05 15:20:25 Make order match header.
stevenjb 2012/03/05 19:50:06 Done.
const std::string& extension_app_id) {
if (extension_app_id.empty())
- return;
+ return NULL;
Profile* profile =
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
ExtensionService* extension_service = profile->GetExtensionService();
if (!extension_service || !extension_service->is_ready())
- return;
+ return NULL;
const Extension* extension =
extension_service->GetExtensionById(extension_app_id, false);
+ return extension;
+}
+
+void ExtensionTabHelper::SetExtensionAppById(
+ const std::string& extension_app_id) {
+ const Extension* extension = GetExtension(extension_app_id);
if (extension)
SetExtensionApp(extension);
}
+void ExtensionTabHelper::SetExtensionAppIconById(
+ const std::string& extension_app_id) {
+ const Extension* extension = GetExtension(extension_app_id);
+ if (extension)
+ UpdateExtensionAppIcon(extension);
+}
+
SkBitmap* ExtensionTabHelper::GetExtensionAppIcon() {
if (extension_app_icon_.empty())
return NULL;

Powered by Google App Engine
This is Rietveld 408576698