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

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

Issue 10883069: Added restore functionality for maximize full/left/right (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test failure Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/maximize_bubble_controller.cc ('k') | ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FRAME_MAXIMIZE_BUTTON_H_ 5 #ifndef ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_
6 #define ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ 6 #define ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/wm/workspace/maximize_bubble_frame_state.h"
9 #include "ash/wm/workspace/snap_types.h" 10 #include "ash/wm/workspace/snap_types.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "base/timer.h" 12 #include "base/timer.h"
12 #include "ui/aura/window_observer.h" 13 #include "ui/aura/window_observer.h"
13 #include "ui/views/controls/button/image_button.h" 14 #include "ui/views/controls/button/image_button.h"
14 15
15 namespace views { 16 namespace views {
16 class NonClientFrameView; 17 class NonClientFrameView;
17 } 18 }
18 19
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 gfx::Rect ScreenBoundsForType(SnapType type, 111 gfx::Rect ScreenBoundsForType(SnapType type,
111 const internal::SnapSizer& snap_sizer) const; 112 const internal::SnapSizer& snap_sizer) const;
112 113
113 // Converts location to screen coordinates and returns it. These are the 114 // Converts location to screen coordinates and returns it. These are the
114 // coordinates used by the SnapSizer. 115 // coordinates used by the SnapSizer.
115 gfx::Point LocationForSnapSizer(const gfx::Point& location) const; 116 gfx::Point LocationForSnapSizer(const gfx::Point& location) const;
116 117
117 // Snaps the window to the current snap position. 118 // Snaps the window to the current snap position.
118 void Snap(const internal::SnapSizer& snap_sizer); 119 void Snap(const internal::SnapSizer& snap_sizer);
119 120
121 // Determine the maximize type of this window.
122 MaximizeBubbleFrameState GetMaximizeBubbleFrameState() const;
123
120 // Frame that the maximize button acts on. 124 // Frame that the maximize button acts on.
121 views::NonClientFrameView* frame_; 125 views::NonClientFrameView* frame_;
122 126
123 // Renders the snap position. 127 // Renders the snap position.
124 scoped_ptr<internal::PhantomWindowController> phantom_window_; 128 scoped_ptr<internal::PhantomWindowController> phantom_window_;
125 129
126 // Is snapping enabled? Set on press so that in drag we know whether we 130 // Is snapping enabled? Set on press so that in drag we know whether we
127 // should show the snap locations. 131 // should show the snap locations.
128 bool is_snap_enabled_; 132 bool is_snap_enabled_;
129 133
(...skipping 19 matching lines...) Expand all
149 153
150 // The delay of the bubble appearance. 154 // The delay of the bubble appearance.
151 int bubble_appearance_delay_ms_; 155 int bubble_appearance_delay_ms_;
152 156
153 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); 157 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton);
154 }; 158 };
155 159
156 } // namespace ash 160 } // namespace ash
157 161
158 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ 162 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_bubble_controller.cc ('k') | ash/wm/workspace/frame_maximize_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698