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

Unified Diff: mash/wm/shadow_controller.h

Issue 1492323003: Updates shadow when active window changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years 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 | « mash/wm/property_util.cc ('k') | mash/wm/shadow_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/shadow_controller.h
diff --git a/mash/wm/shadow_controller.h b/mash/wm/shadow_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc11f4fd4858508f8f4fc23e1c2e4e18fc129669
--- /dev/null
+++ b/mash/wm/shadow_controller.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MASH_WM_SHADOW_CONTROLLER_H_
+#define MASH_WM_SHADOW_CONTROLLER_H_
+
+#include "base/basictypes.h"
+#include "components/mus/public/cpp/window_observer.h"
+#include "components/mus/public/cpp/window_tree_connection_observer.h"
+
+namespace mus {
+class WindowTreeConnection;
+}
+
+namespace mash {
+namespace wm {
+
+class ShadowController : public mus::WindowTreeConnectionObserver,
+ public mus::WindowObserver {
+ public:
+ explicit ShadowController(mus::WindowTreeConnection* window_tree);
+ ~ShadowController() override;
+
+ private:
+ void SetActiveWindow(mus::Window* window);
+
+ // mus::WindowTreeConnectionObserver:
+ void OnWindowTreeFocusChanged(mus::Window* gained_focus,
+ mus::Window* lost_focus) override;
+
+ // mus::WindowObserver:
+ void OnWindowDestroying(mus::Window* window) override;
+
+ mus::WindowTreeConnection* window_tree_;
+ mus::Window* active_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShadowController);
+};
+
+} // namespace wm
+} // namespace mash
+
+#endif // MASH_WM_SHADOW_CONTROLLER_H_
« no previous file with comments | « mash/wm/property_util.cc ('k') | mash/wm/shadow_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698