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

Unified Diff: ash/wm/dock/docked_window_layout_manager.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 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
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.h ('k') | ash/wm/dock/docked_window_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager.cc
diff --git a/ash/wm/dock/docked_window_layout_manager.cc b/ash/wm/dock/docked_window_layout_manager.cc
index 30701a94c63316234056335689346cb53e61264b..1601af2f79dd34f18a7611ef9e16b985d14343c7 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -15,6 +15,7 @@
#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/window_properties.h"
+#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "base/auto_reset.h"
#include "base/command_line.h"
@@ -84,7 +85,7 @@ DockedWindowLayoutManager* GetDockLayoutManager(aura::Window* window,
// Certain windows (minimized, hidden or popups) do not matter to docking.
bool IsUsedByLayout(aura::Window* window) {
return (window->IsVisible() &&
- !wm::IsWindowMinimized(window) &&
+ !wm::GetWindowState(window)->IsMinimized() &&
window->type() != aura::client::WINDOW_TYPE_POPUP);
}
@@ -411,10 +412,10 @@ void DockedWindowLayoutManager::OnWindowPropertyChanged(aura::Window* window,
// until WillChangeVisibilityState is called when the shelf is visible again
if (shelf_hidden_)
return;
- if (wm::IsWindowMinimized(window))
- MinimizeWindow(window);
+ if (wm::GetWindowState(window)->IsMinimized())
+ MinimizeDockedWindow(window);
else
- RestoreWindow(window);
+ RestoreDockedWindow(window);
}
void DockedWindowLayoutManager::OnWindowBoundsChanged(
@@ -479,10 +480,10 @@ void DockedWindowLayoutManager::WillChangeVisibilityState(
continue;
if (shelf_hidden_) {
if (window->IsVisible())
- MinimizeWindow(window);
+ MinimizeDockedWindow(window);
} else {
- if (!wm::IsWindowMinimized(window))
- RestoreWindow(window);
+ if (!wm::GetWindowState(window)->IsMinimized())
+ RestoreDockedWindow(window);
}
}
}
@@ -493,16 +494,17 @@ void DockedWindowLayoutManager::WillChangeVisibilityState(
////////////////////////////////////////////////////////////////////////////////
// DockLayoutManager private implementation:
-void DockedWindowLayoutManager::MinimizeWindow(aura::Window* window) {
+void DockedWindowLayoutManager::MinimizeDockedWindow(aura::Window* window) {
DCHECK_NE(window->type(), aura::client::WINDOW_TYPE_POPUP);
views::corewm::SetWindowVisibilityAnimationType(
window, WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE);
window->Hide();
- if (wm::IsActiveWindow(window))
- wm::DeactivateWindow(window);
+ wm::WindowState* window_state = wm::GetWindowState(window);
+ if (window_state->IsActive())
+ window_state->Deactivate();
}
-void DockedWindowLayoutManager::RestoreWindow(aura::Window* window) {
+void DockedWindowLayoutManager::RestoreDockedWindow(aura::Window* window) {
DCHECK_NE(window->type(), aura::client::WINDOW_TYPE_POPUP);
window->Show();
}
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.h ('k') | ash/wm/dock/docked_window_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698