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

Unified Diff: ash/root_window_controller.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/launcher/launcher.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 7c7909aaadb113ebf7410a765416ace553622646..26d36491b951b18212ddb09a0134c97b5f40ee87 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -40,6 +40,7 @@
#include "ash/wm/system_modal_container_layout_manager.h"
#include "ash/wm/toplevel_window_event_handler.h"
#include "ash/wm/window_properties.h"
+#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller.h"
#include "base/command_line.h"
@@ -96,10 +97,14 @@ aura::Window* CreateContainer(int window_id,
// Reparents |window| to |new_parent|.
void ReparentWindow(aura::Window* window, aura::Window* new_parent) {
// Update the restore bounds to make it relative to the display.
- gfx::Rect restore_bounds(GetRestoreBoundsInParent(window));
+ wm::WindowState* state = wm::GetWindowState(window);
+ gfx::Rect restore_bounds;
+ bool has_restore_bounds = state->HasRestoreBounds();
+ if (has_restore_bounds)
+ restore_bounds = state->GetRestoreBoundsInParent();
new_parent->AddChild(window);
- if (!restore_bounds.IsEmpty())
- SetRestoreBoundsInParent(window, restore_bounds);
+ if (has_restore_bounds)
+ state->SetRestoreBoundsInParent(restore_bounds);
}
// Reparents the appropriate set of windows from |src| to |dst|.
@@ -508,7 +513,7 @@ const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const {
GetContainer(kShellWindowId_DefaultContainer)->children();
for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
iter != windows.rend(); ++iter) {
- if (wm::IsWindowFullscreen(*iter))
+ if (wm::GetWindowState(*iter)->IsFullscreen())
return *iter;
}
return NULL;
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698