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

Unified Diff: ash/aura/wm_shell_aura.cc

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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/aura/wm_shell_aura.cc
diff --git a/ash/wm/aura/wm_globals_aura.cc b/ash/aura/wm_shell_aura.cc
similarity index 68%
rename from ash/wm/aura/wm_globals_aura.cc
rename to ash/aura/wm_shell_aura.cc
index 2967a5fddc934e1e3a14214b3f392e333701205c..7e5c93a1b2f563402bb04ab0f1e47228ca9f4829 100644
--- a/ash/wm/aura/wm_globals_aura.cc
+++ b/ash/aura/wm_shell_aura.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/wm/aura/wm_globals_aura.h"
+#include "ash/aura/wm_shell_aura.h"
-#include "ash/common/wm/wm_activation_observer.h"
-#include "ash/common/wm/wm_display_observer.h"
-#include "ash/common/wm/wm_overview_mode_observer.h"
+#include "ash/aura/wm_window_aura.h"
+#include "ash/common/wm_activation_observer.h"
+#include "ash/common/wm_display_observer.h"
+#include "ash/common/wm_overview_mode_observer.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
-#include "ash/wm/aura/wm_window_aura.h"
#include "ash/wm/drag_window_resizer.h"
#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/overview/window_selector_controller.h"
@@ -21,15 +21,14 @@
#include "ui/wm/public/activation_client.h"
namespace ash {
-namespace wm {
-WmGlobalsAura::WmGlobalsAura() {
- WmGlobals::Set(this);
+WmShellAura::WmShellAura() {
+ WmShell::Set(this);
Shell::GetInstance()->AddShellObserver(this);
}
-WmGlobalsAura::~WmGlobalsAura() {
- WmGlobals::Set(nullptr);
+WmShellAura::~WmShellAura() {
+ WmShell::Set(nullptr);
if (added_activation_observer_) {
aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
->RemoveObserver(this);
@@ -40,67 +39,67 @@ WmGlobalsAura::~WmGlobalsAura() {
Shell::GetInstance()->RemoveShellObserver(this);
}
-WmWindow* WmGlobalsAura::NewContainerWindow() {
+WmWindow* WmShellAura::NewContainerWindow() {
aura::Window* aura_window = new aura::Window(nullptr);
aura_window->Init(ui::LAYER_NOT_DRAWN);
return WmWindowAura::Get(aura_window);
}
-WmWindow* WmGlobalsAura::GetFocusedWindow() {
+WmWindow* WmShellAura::GetFocusedWindow() {
return WmWindowAura::Get(
aura::client::GetFocusClient(Shell::GetPrimaryRootWindow())
->GetFocusedWindow());
}
-WmWindow* WmGlobalsAura::GetActiveWindow() {
+WmWindow* WmShellAura::GetActiveWindow() {
return WmWindowAura::Get(wm::GetActiveWindow());
}
-WmWindow* WmGlobalsAura::GetPrimaryRootWindow() {
+WmWindow* WmShellAura::GetPrimaryRootWindow() {
return WmWindowAura::Get(Shell::GetPrimaryRootWindow());
}
-WmWindow* WmGlobalsAura::GetRootWindowForDisplayId(int64_t display_id) {
+WmWindow* WmShellAura::GetRootWindowForDisplayId(int64_t display_id) {
return WmWindowAura::Get(Shell::GetInstance()
->window_tree_host_manager()
->GetRootWindowForDisplayId(display_id));
}
-WmWindow* WmGlobalsAura::GetRootWindowForNewWindows() {
+WmWindow* WmShellAura::GetRootWindowForNewWindows() {
return WmWindowAura::Get(Shell::GetTargetRootWindow());
}
-std::vector<WmWindow*> WmGlobalsAura::GetMruWindowList() {
+std::vector<WmWindow*> WmShellAura::GetMruWindowList() {
return WmWindowAura::FromAuraWindows(
Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList());
}
-std::vector<WmWindow*> WmGlobalsAura::GetMruWindowListIgnoreModals() {
+std::vector<WmWindow*> WmShellAura::GetMruWindowListIgnoreModals() {
return WmWindowAura::FromAuraWindows(
Shell::GetInstance()->mru_window_tracker()->BuildWindowListIgnoreModal());
}
-bool WmGlobalsAura::IsForceMaximizeOnFirstRun() {
+bool WmShellAura::IsForceMaximizeOnFirstRun() {
return Shell::GetInstance()->delegate()->IsForceMaximizeOnFirstRun();
}
-bool WmGlobalsAura::IsUserSessionBlocked() {
+bool WmShellAura::IsUserSessionBlocked() {
return Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked();
}
-bool WmGlobalsAura::IsScreenLocked() {
+bool WmShellAura::IsScreenLocked() {
return Shell::GetInstance()->session_state_delegate()->IsScreenLocked();
}
-void WmGlobalsAura::LockCursor() {
+void WmShellAura::LockCursor() {
Shell::GetInstance()->cursor_manager()->LockCursor();
}
-void WmGlobalsAura::UnlockCursor() {
+void WmShellAura::UnlockCursor() {
Shell::GetInstance()->cursor_manager()->UnlockCursor();
}
-std::vector<WmWindow*> WmGlobalsAura::GetAllRootWindows() {
+std::vector<WmWindow*> WmShellAura::GetAllRootWindows() {
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
std::vector<WmWindow*> wm_windows(root_windows.size());
for (size_t i = 0; i < root_windows.size(); ++i)
@@ -108,32 +107,32 @@ std::vector<WmWindow*> WmGlobalsAura::GetAllRootWindows() {
return wm_windows;
}
-void WmGlobalsAura::RecordUserMetricsAction(WmUserMetricsAction action) {
+void WmShellAura::RecordUserMetricsAction(wm::WmUserMetricsAction action) {
return Shell::GetInstance()->metrics()->RecordUserMetricsAction(action);
}
-std::unique_ptr<WindowResizer> WmGlobalsAura::CreateDragWindowResizer(
+std::unique_ptr<WindowResizer> WmShellAura::CreateDragWindowResizer(
std::unique_ptr<WindowResizer> next_window_resizer,
wm::WindowState* window_state) {
return base::WrapUnique(
DragWindowResizer::Create(next_window_resizer.release(), window_state));
}
-bool WmGlobalsAura::IsOverviewModeSelecting() {
+bool WmShellAura::IsOverviewModeSelecting() {
WindowSelectorController* window_selector_controller =
Shell::GetInstance()->window_selector_controller();
return window_selector_controller &&
window_selector_controller->IsSelecting();
}
-bool WmGlobalsAura::IsOverviewModeRestoringMinimizedWindows() {
+bool WmShellAura::IsOverviewModeRestoringMinimizedWindows() {
WindowSelectorController* window_selector_controller =
Shell::GetInstance()->window_selector_controller();
return window_selector_controller &&
window_selector_controller->IsRestoringMinimizedWindows();
}
-void WmGlobalsAura::AddActivationObserver(WmActivationObserver* observer) {
+void WmShellAura::AddActivationObserver(WmActivationObserver* observer) {
if (!added_activation_observer_) {
added_activation_observer_ = true;
aura::client::GetActivationClient(Shell::GetPrimaryRootWindow())
@@ -142,11 +141,11 @@ void WmGlobalsAura::AddActivationObserver(WmActivationObserver* observer) {
activation_observers_.AddObserver(observer);
}
-void WmGlobalsAura::RemoveActivationObserver(WmActivationObserver* observer) {
+void WmShellAura::RemoveActivationObserver(WmActivationObserver* observer) {
activation_observers_.RemoveObserver(observer);
}
-void WmGlobalsAura::AddDisplayObserver(WmDisplayObserver* observer) {
+void WmShellAura::AddDisplayObserver(WmDisplayObserver* observer) {
if (!added_display_observer_) {
added_display_observer_ = true;
Shell::GetInstance()->window_tree_host_manager()->AddObserver(this);
@@ -154,20 +153,19 @@ void WmGlobalsAura::AddDisplayObserver(WmDisplayObserver* observer) {
display_observers_.AddObserver(observer);
}
-void WmGlobalsAura::RemoveDisplayObserver(WmDisplayObserver* observer) {
+void WmShellAura::RemoveDisplayObserver(WmDisplayObserver* observer) {
display_observers_.RemoveObserver(observer);
}
-void WmGlobalsAura::AddOverviewModeObserver(WmOverviewModeObserver* observer) {
+void WmShellAura::AddOverviewModeObserver(WmOverviewModeObserver* observer) {
overview_mode_observers_.AddObserver(observer);
}
-void WmGlobalsAura::RemoveOverviewModeObserver(
- WmOverviewModeObserver* observer) {
+void WmShellAura::RemoveOverviewModeObserver(WmOverviewModeObserver* observer) {
overview_mode_observers_.RemoveObserver(observer);
}
-void WmGlobalsAura::OnWindowActivated(
+void WmShellAura::OnWindowActivated(
aura::client::ActivationChangeObserver::ActivationReason reason,
aura::Window* gained_active,
aura::Window* lost_active) {
@@ -176,28 +174,27 @@ void WmGlobalsAura::OnWindowActivated(
WmWindowAura::Get(lost_active)));
}
-void WmGlobalsAura::OnAttemptToReactivateWindow(aura::Window* request_active,
- aura::Window* actual_active) {
+void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active,
+ aura::Window* actual_active) {
FOR_EACH_OBSERVER(
WmActivationObserver, activation_observers_,
OnAttemptToReactivateWindow(WmWindowAura::Get(request_active),
WmWindowAura::Get(actual_active)));
}
-void WmGlobalsAura::OnDisplayConfigurationChanging() {
+void WmShellAura::OnDisplayConfigurationChanging() {
FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
OnDisplayConfigurationChanging());
}
-void WmGlobalsAura::OnDisplayConfigurationChanged() {
+void WmShellAura::OnDisplayConfigurationChanged() {
FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
OnDisplayConfigurationChanged());
}
-void WmGlobalsAura::OnOverviewModeEnded() {
+void WmShellAura::OnOverviewModeEnded() {
FOR_EACH_OBSERVER(WmOverviewModeObserver, overview_mode_observers_,
OnOverviewModeEnded());
}
-} // namespace wm
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698