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

Unified Diff: ash/mus/shadow_controller.cc

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: move comment Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/shadow_controller.h ('k') | ash/mus/shelf_layout_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/shadow_controller.cc
diff --git a/mash/wm/shadow_controller.cc b/ash/mus/shadow_controller.cc
similarity index 70%
rename from mash/wm/shadow_controller.cc
rename to ash/mus/shadow_controller.cc
index 280bdaeee2151dc2402cf29cbda91b0a2787da67..91a6bc00fcacd14abdf60ac9ca3760e41e3a31c4 100644
--- a/mash/wm/shadow_controller.cc
+++ b/ash/mus/shadow_controller.cc
@@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mash/wm/shadow_controller.h"
+#include "ash/mus/shadow_controller.h"
+#include "ash/mus/property_util.h"
+#include "ash/mus/shadow.h"
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_tree_client.h"
-#include "mash/wm/property_util.h"
-#include "mash/wm/shadow.h"
-namespace mash {
-namespace wm {
+namespace ash {
+namespace mus {
namespace {
// Returns the first ancestor of |from| (including |from|) that has a shadow.
-mus::Window* FindAncestorWithShadow(mus::Window* from) {
- mus::Window* result = from;
+::mus::Window* FindAncestorWithShadow(::mus::Window* from) {
+ ::mus::Window* result = from;
while (result && !GetShadow(result))
result = result->parent();
// Small shadows never change.
@@ -25,7 +25,7 @@ mus::Window* FindAncestorWithShadow(mus::Window* from) {
} // namespace
-ShadowController::ShadowController(mus::WindowTreeClient* window_tree)
+ShadowController::ShadowController(::mus::WindowTreeClient* window_tree)
: window_tree_(window_tree), active_window_(nullptr) {
window_tree_->AddObserver(this);
SetActiveWindow(FindAncestorWithShadow(window_tree_->GetFocusedWindow()));
@@ -37,7 +37,7 @@ ShadowController::~ShadowController() {
active_window_->RemoveObserver(this);
}
-void ShadowController::SetActiveWindow(mus::Window* window) {
+void ShadowController::SetActiveWindow(::mus::Window* window) {
if (window == active_window_)
return;
@@ -53,15 +53,15 @@ void ShadowController::SetActiveWindow(mus::Window* window) {
}
}
-void ShadowController::OnWindowTreeFocusChanged(mus::Window* gained_focus,
- mus::Window* lost_focus) {
+void ShadowController::OnWindowTreeFocusChanged(::mus::Window* gained_focus,
+ ::mus::Window* lost_focus) {
SetActiveWindow(FindAncestorWithShadow(gained_focus));
}
-void ShadowController::OnWindowDestroying(mus::Window* window) {
+void ShadowController::OnWindowDestroying(::mus::Window* window) {
DCHECK_EQ(window, active_window_);
SetActiveWindow(nullptr);
}
-} // namespace wm
-} // namespace mash
+} // namespace mus
+} // namespace ash
« no previous file with comments | « ash/mus/shadow_controller.h ('k') | ash/mus/shelf_layout_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698