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

Unified Diff: chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc

Issue 11363250: Allow Chrome apps to create Ash Panels (apps v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Multi-icon support Created 8 years, 1 month 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/ash/launcher/shell_window_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc
index af2b06ce3d853f0e5fa14daee6a0e68b3c4b6f1a..bd6c5f8f99fbd45e42252ca4e98ba9e54db0dda3 100644
--- a/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/shell_window_launcher_controller.cc
@@ -9,6 +9,7 @@
#include "ash/shell.h"
#include "ash/wm/window_util.h"
#include "base/stl_util.h"
+#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
@@ -22,6 +23,8 @@ namespace {
// Currently apps have a single launcher item, so the launcher id is the
// same as the app id. In the future, this may not be true (e.g. for panels).
std::string GetAppLauncherId(ShellWindow* shell_window) {
+ if (shell_window->window_type() == ShellWindow::WINDOW_TYPE_PANEL)
+ return base::IntToString(shell_window->session_id().id());
sky 2012/11/20 02:05:05 Do you know this id is never going to conflict wit
stevenjb 2012/11/20 21:20:58 This uses SessionID which is globally unique acros
sky 2012/11/20 22:15:51 Indeed. But the return value from this is used in
stevenjb 2012/11/20 22:29:10 Ahh. Apologies, excellent point. I'll put a prefix
return shell_window->extension()->id();
}

Powered by Google App Engine
This is Rietveld 408576698