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

Unified Diff: chrome/browser/ui/panels/panel.cc

Issue 6975062: Update Panel UI looks on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/panels/panel.cc
===================================================================
--- chrome/browser/ui/panels/panel.cc (revision 87324)
+++ chrome/browser/ui/panels/panel.cc (working copy)
@@ -5,10 +5,25 @@
#include "chrome/browser/ui/panels/panel.h"
#include "base/logging.h"
+#include "chrome/browser/extensions/extension_prefs.h"
+#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/panels/panel_manager.h"
+#include "chrome/browser/web_applications/web_app.h"
+#include "chrome/common/extensions/extension.h"
#include "ui/gfx/rect.h"
+// static
+const Extension* Panel::GetExtension(Browser* browser) {
+ // Find the extension. When we create a panel from an extension, the extension
+ // ID is passed as the app name to the Browser.
+ ExtensionService* extension_service =
+ browser->GetProfile()->GetExtensionService();
+ return extension_service->GetExtensionById(
+ web_app::GetExtensionIdFromApplicationName(browser->app_name()), false);
+}
+
Panel::Panel(Browser* browser, const gfx::Rect& bounds)
: bounds_(bounds),
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698