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

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

Issue 2735983006: Renames WmWindowUserData and converts to using aura (Closed)
Patch Set: ownership comments 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.cc
diff --git a/ash/common/wm/screen_dimmer.cc b/ash/common/wm/screen_dimmer.cc
index 8304d118252ea8ee4d09c263390d74121adde646..5986b5d209ac84156c030f54d2f338e75b2f5f84 100644
--- a/ash/common/wm/screen_dimmer.cc
+++ b/ash/common/wm/screen_dimmer.cc
@@ -4,14 +4,14 @@
#include "ash/common/wm/screen_dimmer.h"
+#include "ash/common/window_user_data.h"
#include "ash/common/wm/container_finder.h"
#include "ash/common/wm/window_dimmer.h"
-#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
-#include "ash/common/wm_window_user_data.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shell.h"
#include "base/memory/ptr_util.h"
+#include "ui/aura/window.h"
namespace ash {
namespace {
@@ -28,7 +28,7 @@ ScreenDimmer::ScreenDimmer(Container container)
: container_(container),
is_dimming_(false),
at_bottom_(false),
- window_dimmers_(base::MakeUnique<WmWindowUserData<WindowDimmer>>()) {
+ window_dimmers_(base::MakeUnique<WindowUserData<WindowDimmer>>()) {
Shell::GetInstance()->AddShellObserver(this);
}
@@ -46,9 +46,9 @@ void ScreenDimmer::SetDimming(bool should_dim) {
Update(should_dim);
}
-std::vector<WmWindow*> ScreenDimmer::GetAllContainers() {
+aura::Window::Windows ScreenDimmer::GetAllContainers() {
return container_ == Container::ROOT
- ? WmShell::Get()->GetAllRootWindows()
+ ? Shell::GetAllRootWindows()
: wm::GetContainersFromAllRootWindows(
ash::kShellWindowId_LockScreenContainersContainer);
}
@@ -58,7 +58,7 @@ void ScreenDimmer::OnRootWindowAdded(WmWindow* root_window) {
}
void ScreenDimmer::Update(bool should_dim) {
- for (WmWindow* container : GetAllContainers()) {
+ for (aura::Window* container : GetAllContainers()) {
WindowDimmer* window_dimmer = window_dimmers_->Get(container);
if (should_dim) {
if (!window_dimmer) {

Powered by Google App Engine
This is Rietveld 408576698