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

Unified Diff: ui/aura_shell/launcher/launcher.h

Issue 8289022: Wires keeping the launcher up to date with the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 2 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 | « ui/aura/window_observer.h ('k') | ui/aura_shell/launcher/launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/launcher/launcher.h
diff --git a/ui/aura_shell/launcher/launcher.h b/ui/aura_shell/launcher/launcher.h
index 0dda1522195c2876045329c2ad9cf282a77975ab..a1c97de5fcc40e4683343e884281db0d2d2c0130 100644
--- a/ui/aura_shell/launcher/launcher.h
+++ b/ui/aura_shell/launcher/launcher.h
@@ -6,6 +6,8 @@
#define UI_AURA_SHELL_LAUNCHER_LAUNCHER_H_
#pragma once
+#include <map>
+
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ui/aura/window_observer.h"
@@ -32,9 +34,17 @@ class AURA_SHELL_EXPORT Launcher : public aura::WindowObserver {
views::Widget* widget() { return widget_; }
private:
+ typedef std::map<aura::Window*, bool> WindowMap;
+
+ // If necessary asks the delegate if an entry should be created in the
+ // launcher for |window|. This only asks the delegate once for a window.
+ void MaybeAdd(aura::Window* window);
+
// WindowObserver overrides:
virtual void OnWindowAdded(aura::Window* new_window) OVERRIDE;
virtual void OnWillRemoveWindow(aura::Window* window) OVERRIDE;
+ virtual void OnWindowVisibilityChanged(aura::Window* window,
+ bool visibile) OVERRIDE;
scoped_ptr<LauncherModel> model_;
@@ -43,6 +53,10 @@ class AURA_SHELL_EXPORT Launcher : public aura::WindowObserver {
aura::ToplevelWindowContainer* window_container_;
+ // The set of windows we know about. The boolean indicates whether we've asked
+ // the delegate if the window should added to the launcher.
+ WindowMap known_windows_;
+
DISALLOW_COPY_AND_ASSIGN(Launcher);
};
« no previous file with comments | « ui/aura/window_observer.h ('k') | ui/aura_shell/launcher/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698