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

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: 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
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 577d2b57fa5d5e421ad595793031f64af8c50e19..ff075b9df28ef21ebcca2b8f006ca5f0296c741b 100644
--- a/ash/wm/dock/docked_window_layout_manager.cc
+++ b/ash/wm/dock/docked_window_layout_manager.cc
@@ -14,6 +14,7 @@
#include "ash/shell_window_ids.h"
#include "ash/wm/coordinate_conversion.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(
@@ -477,10 +478,10 @@ void DockedWindowLayoutManager::WillChangeVisibilityState(
aura::Window* window = dock_container_->children()[i];
if (shelf_hidden_) {
if (window->IsVisible())
- MinimizeWindow(window);
+ MinimizeDockedWindow(window);
} else {
- if (!wm::IsWindowMinimized(window))
- RestoreWindow(window);
+ if (!wm::GetWindowState(window)->IsMinimized())
+ RestoreDockedWindow(window);
}
}
}
@@ -491,13 +492,13 @@ void DockedWindowLayoutManager::WillChangeVisibilityState(
////////////////////////////////////////////////////////////////////////////////
// DockLayoutManager private implementation:
-void DockedWindowLayoutManager::MinimizeWindow(aura::Window* window) {
+void DockedWindowLayoutManager::MinimizeDockedWindow(aura::Window* window) {
James Cook 2013/09/18 20:44:17 Good idea renaming these
window->Hide();
if (wm::IsActiveWindow(window))
wm::DeactivateWindow(window);
}
-void DockedWindowLayoutManager::RestoreWindow(aura::Window* window) {
+void DockedWindowLayoutManager::RestoreDockedWindow(aura::Window* window) {
window->Show();
}

Powered by Google App Engine
This is Rietveld 408576698