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

Unified Diff: ash/wm/window_state.h

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undocks window first before side-snapping bounds (comments) Created 7 years, 1 month 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_positioner.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state.h
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h
index 2bbdd035b0d127d001746d55ddfc9ba0b96d426b..31be19f5cff9af062d6acca04c58eba364385167 100644
--- a/ash/wm/window_state.h
+++ b/ash/wm/window_state.h
@@ -69,6 +69,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
bool IsNormalShowState() const;
bool IsActive() const;
bool IsDocked() const;
+ bool IsSnapped() const;
// Checks if the window can change its state accordingly.
bool CanMaximize() const;
@@ -188,9 +189,11 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
// Whether or not the window's position or size was changed by a user.
bool bounds_changed_by_user() const { return bounds_changed_by_user_; }
- void set_bounds_changed_by_user(bool bounds_changed_by_user) {
- bounds_changed_by_user_ = bounds_changed_by_user;
- }
+
+ // Sets |bounds_changed_by_user_| to the value passed in a parameter.
+ // If the new value is true allows the window to be repositioned away from
+ // snapped state at the screen edge.
+ void SetBoundsChangedByUser(bool bounds_changed_by_user);
// True if this window is an attached panel.
bool panel_attached() const {
@@ -257,6 +260,9 @@ class ASH_EXPORT WindowState : public aura::WindowObserver {
void SnapWindow(WindowShowType left_or_right,
const gfx::Rect& bounds);
+ // Allows window to be repositioned away from the screen edge.
+ void SetWindowShowTypeUnsnapped();
+
// The owner of this window settings.
aura::Window* window_;
scoped_ptr<WindowStateDelegate> delegate_;
« no previous file with comments | « ash/wm/window_positioner.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698