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

Unified Diff: ash/common/wm/screen_dimmer.h

Issue 2735983006: Renames WmWindowUserData and converts to using aura (Closed)
Patch Set: more cleanup Created 3 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/common/wm/screen_dimmer.h
diff --git a/ash/common/wm/screen_dimmer.h b/ash/common/wm/screen_dimmer.h
index 1667b057553fe948bea4712cb21d519e7f52ed6b..24609596531d94ef09c464b253b1afa5f447051f 100644
--- a/ash/common/wm/screen_dimmer.h
+++ b/ash/common/wm/screen_dimmer.h
@@ -12,15 +12,17 @@
#include "ash/common/shell_observer.h"
#include "base/macros.h"
-namespace ash {
-namespace test {
-class ScreenDimmerTest;
+namespace aura {
+class Window;
}
+namespace ash {
+
class WindowDimmer;
-template <typename UserData>
-class WmWindowUserData;
+namespace test {
+class ScreenDimmerTest;
+}
// ScreenDimmer displays a partially-opaque layer above everything
// else in the given container window to darken the display. It shouldn't be
@@ -53,8 +55,12 @@ class ASH_EXPORT ScreenDimmer : public ShellObserver {
private:
friend class test::ScreenDimmerTest;
- // Returns the WmWindows (one per display) that correspond to |container_|.
- std::vector<WmWindow*> GetAllContainers();
+ // Returns the WindowDimmer for |window|. This used in tests.
James Cook 2017/03/09 18:39:27 ForTesting, then?
sky 2017/03/09 20:39:04 This has been nuked.
+ static WindowDimmer* GetWindowDimmer(aura::Window* window);
+
+ // Returns the aura::Windows (one per display) that correspond to
+ // |container_|.
+ std::vector<aura::Window*> GetAllContainers();
// ShellObserver:
void OnRootWindowAdded(WmWindow* root_window) override;
@@ -69,9 +75,6 @@ class ASH_EXPORT ScreenDimmer : public ShellObserver {
bool is_dimming_;
bool at_bottom_;
- // Owns the WindowDimmers.
- std::unique_ptr<WmWindowUserData<WindowDimmer>> window_dimmers_;
-
DISALLOW_COPY_AND_ASSIGN(ScreenDimmer);
};

Powered by Google App Engine
This is Rietveld 408576698