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

Side by Side Diff: ash/wm/screen_dimmer.h

Issue 2906693003: [mus+ash] Removes WmWindow from screen_dimmer and video_detector (Closed)
Patch Set: [mus+ash] Removes WmWindow from screen_dimmer and video_detector Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « ash/wallpaper/wallpaper_view.cc ('k') | ash/wm/screen_dimmer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_SCREEN_DIMMER_H_ 5 #ifndef ASH_WM_SCREEN_DIMMER_H_
6 #define ASH_WM_SCREEN_DIMMER_H_ 6 #define ASH_WM_SCREEN_DIMMER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/shell_observer.h" 12 #include "ash/shell_observer.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 14
15 namespace aura {
16 class Window;
17 }
18
19 namespace ash { 15 namespace ash {
20 16
21 class WindowDimmer; 17 class WindowDimmer;
22 18
23 template <typename UserData> 19 template <typename UserData>
24 class WindowUserData; 20 class WindowUserData;
25 21
26 namespace test { 22 namespace test {
27 class ScreenDimmerTest; 23 class ScreenDimmerTest;
28 } 24 }
(...skipping 27 matching lines...) Expand all
56 static ScreenDimmer* FindForTest(int container_id); 52 static ScreenDimmer* FindForTest(int container_id);
57 53
58 private: 54 private:
59 friend class test::ScreenDimmerTest; 55 friend class test::ScreenDimmerTest;
60 56
61 // Returns the aura::Windows (one per display) that correspond to 57 // Returns the aura::Windows (one per display) that correspond to
62 // |container_|. 58 // |container_|.
63 std::vector<aura::Window*> GetAllContainers(); 59 std::vector<aura::Window*> GetAllContainers();
64 60
65 // ShellObserver: 61 // ShellObserver:
66 void OnRootWindowAdded(WmWindow* root_window) override; 62 void OnRootWindowAdded(aura::Window* root_window) override;
67 63
68 // Update the dimming state. This will also create a new DimWindow 64 // Update the dimming state. This will also create a new DimWindow
69 // if necessary. (Used when a new display is connected) 65 // if necessary. (Used when a new display is connected)
70 void Update(bool should_dim); 66 void Update(bool should_dim);
71 67
72 const Container container_; 68 const Container container_;
73 69
74 // Are we currently dimming the screen? 70 // Are we currently dimming the screen?
75 bool is_dimming_; 71 bool is_dimming_;
76 bool at_bottom_; 72 bool at_bottom_;
77 73
78 // Owns the WindowDimmers. 74 // Owns the WindowDimmers.
79 std::unique_ptr<WindowUserData<WindowDimmer>> window_dimmers_; 75 std::unique_ptr<WindowUserData<WindowDimmer>> window_dimmers_;
80 76
81 DISALLOW_COPY_AND_ASSIGN(ScreenDimmer); 77 DISALLOW_COPY_AND_ASSIGN(ScreenDimmer);
82 }; 78 };
83 79
84 } // namespace ash 80 } // namespace ash
85 81
86 #endif // ASH_WM_SCREEN_DIMMER_H_ 82 #endif // ASH_WM_SCREEN_DIMMER_H_
OLDNEW
« no previous file with comments | « ash/wallpaper/wallpaper_view.cc ('k') | ash/wm/screen_dimmer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698