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

Unified Diff: ash/wm/screen_pinning_controller.cc

Issue 2320273002: Refactors DimWindow and moves to ash/common (Closed)
Patch Set: git add wm_window Created 4 years, 3 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/wm/screen_pinning_controller.cc
diff --git a/ash/wm/screen_pinning_controller.cc b/ash/wm/screen_pinning_controller.cc
index a74dffe05f93f21f96de24006be5330650e9e033..f94bb826f12afadc97cee5ba143f25c7594a38ea 100644
--- a/ash/wm/screen_pinning_controller.cc
+++ b/ash/wm/screen_pinning_controller.cc
@@ -9,13 +9,13 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm/window_dimmer.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/common/wm_window_observer.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/shell.h"
-#include "ash/wm/dim_window.h"
#include "base/auto_reset.h"
#include "base/logging.h"
#include "base/stl_util.h"
@@ -25,12 +25,12 @@ namespace ash {
namespace {
WmWindow* CreateDimWindow(WmWindow* container) {
- DimWindow* dim_window = new DimWindow(WmWindowAura::GetAuraWindow(container));
- dim_window->SetDimOpacity(1); // Set whole black.
- WmWindow* result = WmWindowAura::Get(dim_window);
- result->SetFullscreen();
- result->Show();
- return result;
+ // WindowDimmer is owned by |container|.
+ WindowDimmer* window_dimmer = new WindowDimmer(container);
+ window_dimmer->SetDimOpacity(1); // Fully opaque.
+ window_dimmer->window()->SetFullscreen();
+ window_dimmer->window()->Show();
+ return window_dimmer->window();
}
// Returns a list of WmWindows corresponding to SystemModalContainers,

Powered by Google App Engine
This is Rietveld 408576698