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

Unified Diff: ash/shell/window_watcher.cc

Issue 9808026: Layout panels on top of their launcher icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 8 years, 8 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
« no previous file with comments | « ash/shell/window_watcher.h ('k') | ash/test/test_launcher_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/window_watcher.cc
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
index ec14e1bc13f7c83e5243e69107e3c256d3357e97..5398a8a006d80a3a5780ba1e5e8aa5215cab1af0 100644
--- a/ash/shell/window_watcher.cc
+++ b/ash/shell/window_watcher.cc
@@ -7,14 +7,18 @@
#include "ash/launcher/launcher.h"
#include "ash/launcher/launcher_model.h"
#include "ash/shell.h"
+#include "ash/shell_window_ids.h"
#include "ui/aura/window.h"
namespace ash {
namespace shell {
WindowWatcher::WindowWatcher()
- : window_(ash::Shell::GetInstance()->launcher()->window_container()) {
+ : window_(ash::Shell::GetInstance()->launcher()->window_container()),
+ panel_container_(ash::Shell::GetInstance()->GetContainer(
+ ash::internal::kShellWindowId_PanelContainer)) {
window_->AddObserver(this);
+ panel_container_->AddObserver(this);
}
WindowWatcher::~WindowWatcher() {
@@ -37,7 +41,8 @@ ash::LauncherID WindowWatcher::GetIDByWindow(aura::Window* window) const {
// aura::WindowObserver overrides:
void WindowWatcher::OnWindowAdded(aura::Window* new_window) {
- if (new_window->type() != aura::client::WINDOW_TYPE_NORMAL)
+ if (new_window->type() != aura::client::WINDOW_TYPE_NORMAL &&
+ new_window->type() != aura::client::WINDOW_TYPE_PANEL)
return;
static int image_count = 0;
« no previous file with comments | « ash/shell/window_watcher.h ('k') | ash/test/test_launcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698