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

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: Patch for review Created 8 years, 9 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: ash/shell/window_watcher.cc
diff --git a/ash/shell/window_watcher.cc b/ash/shell/window_watcher.cc
index ec14e1bc13f7c83e5243e69107e3c256d3357e97..9c10f7aca906ac44379704fe69f3e3f35c5d8d67 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)
sky 2012/04/03 20:39:37 && on the previous line.
return;
static int image_count = 0;

Powered by Google App Engine
This is Rietveld 408576698