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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer.h

Issue 55363004: Enables docked windows by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enables docked window flag by default (nit) 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WORKSPACE_WINDOW_RESIZER_H_ 5 #ifndef ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 6 #define ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/wm/window_resizer.h" 10 #include "ash/wm/window_resizer.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 virtual void CompleteDrag(int event_flags) OVERRIDE; 67 virtual void CompleteDrag(int event_flags) OVERRIDE;
68 virtual void RevertDrag() OVERRIDE; 68 virtual void RevertDrag() OVERRIDE;
69 virtual aura::Window* GetTarget() OVERRIDE; 69 virtual aura::Window* GetTarget() OVERRIDE;
70 virtual const gfx::Point& GetInitialLocation() const OVERRIDE; 70 virtual const gfx::Point& GetInitialLocation() const OVERRIDE;
71 71
72 private: 72 private:
73 WorkspaceWindowResizer(const Details& details, 73 WorkspaceWindowResizer(const Details& details,
74 const std::vector<aura::Window*>& attached_windows); 74 const std::vector<aura::Window*>& attached_windows);
75 75
76 private: 76 private:
77 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, CancelSnapPhantom); 77 friend class WorkspaceWindowResizerTest;
78 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomSnapMaxSize);
79 FRIEND_TEST_ALL_PREFIXES(WorkspaceWindowResizerTest, PhantomWindowShow);
80 78
81 // Returns the final bounds to place the window at. This differs from 79 // Returns the final bounds to place the window at. This differs from
82 // the current when snapping. 80 // the current when snapping.
83 gfx::Rect GetFinalBounds(const gfx::Rect& bounds) const; 81 gfx::Rect GetFinalBounds(const gfx::Rect& bounds) const;
84 82
85 // Lays out the attached windows. |bounds| is the bounds of the main window. 83 // Lays out the attached windows. |bounds| is the bounds of the main window.
86 void LayoutAttachedWindows(gfx::Rect* bounds); 84 void LayoutAttachedWindows(gfx::Rect* bounds);
87 85
88 // Calculates the new sizes of the attached windows, given that the main 86 // Calculates the new sizes of the attached windows, given that the main
89 // window has been resized (along the primary axis) by |delta|. 87 // window has been resized (along the primary axis) by |delta|.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // should attach. 212 // should attach.
215 MatchedEdge magnetism_edge_; 213 MatchedEdge magnetism_edge_;
216 214
217 // Dock container window layout manager. 215 // Dock container window layout manager.
218 DockedWindowLayoutManager* dock_layout_; 216 DockedWindowLayoutManager* dock_layout_;
219 217
220 // Used to determine if this has been deleted during a drag such as when a tab 218 // Used to determine if this has been deleted during a drag such as when a tab
221 // gets dragged into another browser window. 219 // gets dragged into another browser window.
222 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_; 220 base::WeakPtrFactory<WorkspaceWindowResizer> weak_ptr_factory_;
223 221
222 // Current instance for use by the WorkspaceWindowResizerTest.
223 static WorkspaceWindowResizer* instance_;
224
224 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer); 225 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizer);
225 }; 226 };
226 227
227 } // namespace internal 228 } // namespace internal
228 } // namespace ash 229 } // namespace ash
229 230
230 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_ 231 #endif // ASH_WM_WORKSPACE_WINDOW_RESIZER_H_
OLDNEW
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698