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

Unified Diff: ash/wm/window_state.cc

Issue 314433003: ash: Make wm::WindowState's c'tor private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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/wm/window_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.cc
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc
index 6e49351d1053b12d7fc182431cb572d1fc50385b..ca1e4bc99429155989783483541f4d897990be05 100644
--- a/ash/wm/window_state.cc
+++ b/ash/wm/window_state.cc
@@ -81,24 +81,6 @@ WMEventType WMEventTypeFromShowState(ui::WindowShowState requested_show_state) {
} // namespace
-WindowState::WindowState(aura::Window* window)
- : window_(window),
- window_position_managed_(false),
- bounds_changed_by_user_(false),
- panel_attached_(true),
- ignored_by_shelf_(false),
- can_consume_system_keys_(false),
- top_row_keys_are_function_keys_(false),
- unminimize_to_restore_bounds_(false),
- in_immersive_fullscreen_(false),
- hide_shelf_when_fullscreen_(true),
- minimum_visibility_(false),
- can_be_dragged_(true),
- ignore_property_change_(false),
- current_state_(new DefaultState(ToWindowStateType(GetShowState()))) {
- window_->AddObserver(this);
-}
-
WindowState::~WindowState() {
// WindowState is registered as an owned property of |window_|, and window
// unregisters all of its observers in its d'tor before destroying its
@@ -316,6 +298,28 @@ void WindowState::OnWindowPropertyChanged(aura::Window* window,
}
}
+WindowState::WindowState(aura::Window* window)
+ : window_(window),
+ window_position_managed_(false),
+ bounds_changed_by_user_(false),
+ panel_attached_(true),
+ ignored_by_shelf_(false),
+ can_consume_system_keys_(false),
+ top_row_keys_are_function_keys_(false),
+ unminimize_to_restore_bounds_(false),
+ in_immersive_fullscreen_(false),
+ hide_shelf_when_fullscreen_(true),
+ minimum_visibility_(false),
+ can_be_dragged_(true),
+ ignore_property_change_(false),
+ current_state_(new DefaultState(ToWindowStateType(GetShowState()))) {
+ window_->AddObserver(this);
+}
+
+ui::WindowShowState WindowState::GetShowState() const {
+ return window_->GetProperty(aura::client::kShowStateKey);
+}
+
void WindowState::SetBoundsInScreen(
const gfx::Rect& bounds_in_screen) {
gfx::Rect bounds_in_parent =
@@ -324,10 +328,6 @@ void WindowState::SetBoundsInScreen(
window_->SetBounds(bounds_in_parent);
}
-ui::WindowShowState WindowState::GetShowState() const {
- return window_->GetProperty(aura::client::kShowStateKey);
-}
-
void WindowState::AdjustSnappedBounds(gfx::Rect* bounds) {
if (is_dragged() || !IsSnapped())
return;
« no previous file with comments | « ash/wm/window_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698