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

Side by Side Diff: ash/wm/window_state.h

Issue 27458002: Allow setting different hit test bounds overrides for mouse and touch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_WM_WINDOW_STATE_H_ 5 #ifndef ASH_WM_WINDOW_STATE_H_
6 #define ASH_WM_WINDOW_STATE_H_ 6 #define ASH_WM_WINDOW_STATE_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/wm_types.h" 9 #include "ash/wm/wm_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Returns the window's current ash show type. 52 // Returns the window's current ash show type.
53 // Refer to WindowShowType definition in wm_types.h as for why Ash 53 // Refer to WindowShowType definition in wm_types.h as for why Ash
54 // has its own show type. 54 // has its own show type.
55 WindowShowType window_show_type() const { return window_show_type_; } 55 WindowShowType window_show_type() const { return window_show_type_; }
56 56
57 // Predicates to check window state. 57 // Predicates to check window state.
58 bool IsMinimized() const; 58 bool IsMinimized() const;
59 bool IsMaximized() const; 59 bool IsMaximized() const;
60 bool IsFullscreen() const; 60 bool IsFullscreen() const;
61 // True if the window's show state is SHOW_STATE_FULLSCREEN and the fullscreen
62 // type allows the top-of-window views to be revealed when the mouse is
63 // hovered at the top of the screen.
64 bool IsImmersiveFullscreen() const;
61 bool IsMaximizedOrFullscreen() const; 65 bool IsMaximizedOrFullscreen() const;
62 // True if the window's show state is SHOW_STATE_NORMAL or 66 // True if the window's show state is SHOW_STATE_NORMAL or
63 // SHOW_STATE_DEFAULT. 67 // SHOW_STATE_DEFAULT.
64 bool IsNormalShowState() const; 68 bool IsNormalShowState() const;
65 bool IsActive() const; 69 bool IsActive() const;
66 70
67 // Checks if the window can change its state accordingly. 71 // Checks if the window can change its state accordingly.
68 bool CanMaximize() const; 72 bool CanMaximize() const;
69 bool CanMinimize() const; 73 bool CanMinimize() const;
70 bool CanResize() const; 74 bool CanResize() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // parent's coordinates. 107 // parent's coordinates.
104 void SetRestoreBoundsInParent(const gfx::Rect& bounds_in_parent); 108 void SetRestoreBoundsInParent(const gfx::Rect& bounds_in_parent);
105 109
106 // Sets the restore bounds property on the window in the virtual screen 110 // Sets the restore bounds property on the window in the virtual screen
107 // coordinates. Deletes existing bounds value if exists. 111 // coordinates. Deletes existing bounds value if exists.
108 void SetRestoreBoundsInScreen(const gfx::Rect& bounds_in_screen); 112 void SetRestoreBoundsInScreen(const gfx::Rect& bounds_in_screen);
109 113
110 // Deletes and clears the restore bounds property on the window. 114 // Deletes and clears the restore bounds property on the window.
111 void ClearRestoreBounds(); 115 void ClearRestoreBounds();
112 116
117 // Sets the type of fullscreen. This only has an effect if already in
118 // fullscreen.
119 FullscreenType fullscreen_type() const {
120 return fullscreen_type_;
121 }
122 void SetFullscreenType(FullscreenType type);
123
113 // Sets whether the window should always be restored to the restore bounds 124 // Sets whether the window should always be restored to the restore bounds
114 // (sometimes the workspace layout manager restores the window to its original 125 // (sometimes the workspace layout manager restores the window to its original
115 // bounds instead of the restore bounds. Setting this key overrides that 126 // bounds instead of the restore bounds. Setting this key overrides that
116 // behaviour). The flag is reset to the default value after the window is 127 // behaviour). The flag is reset to the default value after the window is
117 // restored. 128 // restored.
118 bool always_restores_to_restore_bounds() const { 129 bool always_restores_to_restore_bounds() const {
119 return always_restores_to_restore_bounds_; 130 return always_restores_to_restore_bounds_;
120 } 131 }
121 void set_always_restores_to_restore_bounds(bool value) { 132 void set_always_restores_to_restore_bounds(bool value) {
122 always_restores_to_restore_bounds_ = value; 133 always_restores_to_restore_bounds_ = value;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 213 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
203 214
204 private: 215 private:
205 // Snaps the window to left or right of the desktop with given bounds. 216 // Snaps the window to left or right of the desktop with given bounds.
206 void SnapWindow(WindowShowType left_or_right, 217 void SnapWindow(WindowShowType left_or_right,
207 const gfx::Rect& bounds); 218 const gfx::Rect& bounds);
208 219
209 // The owner of this window settings. 220 // The owner of this window settings.
210 aura::Window* window_; 221 aura::Window* window_;
211 222
223 FullscreenType fullscreen_type_;
212 bool tracked_by_workspace_; 224 bool tracked_by_workspace_;
213 bool window_position_managed_; 225 bool window_position_managed_;
214 bool bounds_changed_by_user_; 226 bool bounds_changed_by_user_;
215 bool panel_attached_; 227 bool panel_attached_;
216 bool continue_drag_after_reparent_; 228 bool continue_drag_after_reparent_;
217 bool ignored_by_shelf_; 229 bool ignored_by_shelf_;
218 bool can_consume_system_keys_; 230 bool can_consume_system_keys_;
219 bool top_row_keys_are_function_keys_; 231 bool top_row_keys_are_function_keys_;
220 232
221 bool always_restores_to_restore_bounds_; 233 bool always_restores_to_restore_bounds_;
(...skipping 19 matching lines...) Expand all
241 ASH_EXPORT WindowState* GetWindowState(aura::Window* window); 253 ASH_EXPORT WindowState* GetWindowState(aura::Window* window);
242 254
243 // const version of GetWindowState. 255 // const version of GetWindowState.
244 ASH_EXPORT const WindowState* 256 ASH_EXPORT const WindowState*
245 GetWindowState(const aura::Window* window); 257 GetWindowState(const aura::Window* window);
246 258
247 } // namespace wm 259 } // namespace wm
248 } // namespace ash 260 } // namespace ash
249 261
250 #endif // ASH_WM_WINDOW_STATE_H_ 262 #endif // ASH_WM_WINDOW_STATE_H_
OLDNEW
« no previous file with comments | « ash/wm/window_properties.cc ('k') | ash/wm/window_state.cc » ('j') | ui/aura/window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698