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

Side by Side Diff: views/widget/native_widget_private.h

Issue 7748036: Restoring a session should restore window minimization state on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 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 | « views/widget/native_widget_gtk.cc ('k') | views/widget/native_widget_views.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_
6 #define VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 6 #define VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "views/ime/input_method_delegate.h" 10 #include "views/ime/input_method_delegate.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Returns the InputMethod for this native widget. 130 // Returns the InputMethod for this native widget.
131 // Note that all widgets in a widget hierarchy share the same input method. 131 // Note that all widgets in a widget hierarchy share the same input method.
132 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation 132 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation
133 // class doesn't inherit Widget anymore. 133 // class doesn't inherit Widget anymore.
134 virtual InputMethod* CreateInputMethod() = 0; 134 virtual InputMethod* CreateInputMethod() = 0;
135 135
136 136
137 // Centers the window and sizes it to the specified size. 137 // Centers the window and sizes it to the specified size.
138 virtual void CenterWindow(const gfx::Size& size) = 0; 138 virtual void CenterWindow(const gfx::Size& size) = 0;
139 139
140 // Retrieves the window's current restored bounds and maximized state, for 140 // Retrieves the window's current restored bounds and "show" state, for
141 // persisting. 141 // persisting.
142 virtual void GetWindowBoundsAndMaximizedState(gfx::Rect* bounds, 142 virtual void GetWindowPlacement(
143 bool* maximized) const = 0; 143 gfx::Rect* bounds,
144 ui::WindowShowState* show_state) const = 0;
144 145
145 // Sets the NativeWindow title. 146 // Sets the NativeWindow title.
146 virtual void SetWindowTitle(const std::wstring& title) = 0; 147 virtual void SetWindowTitle(const std::wstring& title) = 0;
147 148
148 // Sets the Window icons. |window_icon| is a 16x16 icon suitable for use in 149 // Sets the Window icons. |window_icon| is a 16x16 icon suitable for use in
149 // a title bar. |app_icon| is a larger size for use in the host environment 150 // a title bar. |app_icon| is a larger size for use in the host environment
150 // app switching UI. 151 // app switching UI.
151 virtual void SetWindowIcons(const SkBitmap& window_icon, 152 virtual void SetWindowIcons(const SkBitmap& window_icon,
152 const SkBitmap& app_icon) = 0; 153 const SkBitmap& app_icon) = 0;
153 154
154 // Update native accessibility properties on the native window. 155 // Update native accessibility properties on the native window.
155 virtual void SetAccessibleName(const std::wstring& name) = 0; 156 virtual void SetAccessibleName(const std::wstring& name) = 0;
156 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) = 0; 157 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) = 0;
157 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) = 0; 158 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) = 0;
158 159
159 enum ShowState {
160 SHOW_RESTORED,
161 SHOW_MAXIMIZED,
162 SHOW_INACTIVE
163 };
164
165 // Makes the NativeWindow modal. 160 // Makes the NativeWindow modal.
166 virtual void BecomeModal() = 0; 161 virtual void BecomeModal() = 0;
167 162
168 // See method documentation in Widget. 163 // See method documentation in Widget.
169 virtual gfx::Rect GetWindowScreenBounds() const = 0; 164 virtual gfx::Rect GetWindowScreenBounds() const = 0;
170 virtual gfx::Rect GetClientAreaScreenBounds() const = 0; 165 virtual gfx::Rect GetClientAreaScreenBounds() const = 0;
171 virtual gfx::Rect GetRestoredBounds() const = 0; 166 virtual gfx::Rect GetRestoredBounds() const = 0;
172 virtual void SetBounds(const gfx::Rect& bounds) = 0; 167 virtual void SetBounds(const gfx::Rect& bounds) = 0;
173 virtual void SetSize(const gfx::Size& size) = 0; 168 virtual void SetSize(const gfx::Size& size) = 0;
174 virtual void SetBoundsConstrained(const gfx::Rect& bounds, 169 virtual void SetBoundsConstrained(const gfx::Rect& bounds,
175 Widget* other_widget) = 0; 170 Widget* other_widget) = 0;
176 virtual void MoveAbove(gfx::NativeView native_view) = 0; 171 virtual void MoveAbove(gfx::NativeView native_view) = 0;
177 virtual void MoveToTop() = 0; 172 virtual void MoveToTop() = 0;
178 virtual void SetShape(gfx::NativeRegion shape) = 0; 173 virtual void SetShape(gfx::NativeRegion shape) = 0;
179 virtual void Close() = 0; 174 virtual void Close() = 0;
180 virtual void CloseNow() = 0; 175 virtual void CloseNow() = 0;
181 virtual void EnableClose(bool enable) = 0; 176 virtual void EnableClose(bool enable) = 0;
182 virtual void Show() = 0; 177 virtual void Show() = 0;
183 virtual void Hide() = 0; 178 virtual void Hide() = 0;
184 // Invoked if the initial show should maximize the window. |restored_bounds| 179 // Invoked if the initial show should maximize the window. |restored_bounds|
185 // is the bounds of the window when not maximized. 180 // is the bounds of the window when not maximized.
186 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0; 181 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0;
187 virtual void ShowWithState(ShowState state) = 0; 182 virtual void ShowWithWindowState(ui::WindowShowState show_state) = 0;
188 virtual bool IsVisible() const = 0; 183 virtual bool IsVisible() const = 0;
189 virtual void Activate() = 0; 184 virtual void Activate() = 0;
190 virtual void Deactivate() = 0; 185 virtual void Deactivate() = 0;
191 virtual bool IsActive() const = 0; 186 virtual bool IsActive() const = 0;
192 virtual void SetAlwaysOnTop(bool always_on_top) = 0; 187 virtual void SetAlwaysOnTop(bool always_on_top) = 0;
193 virtual void Maximize() = 0; 188 virtual void Maximize() = 0;
194 virtual void Minimize() = 0; 189 virtual void Minimize() = 0;
195 virtual bool IsMaximized() const = 0; 190 virtual bool IsMaximized() const = 0;
196 virtual bool IsMinimized() const = 0; 191 virtual bool IsMinimized() const = 0;
197 virtual void Restore() = 0; 192 virtual void Restore() = 0;
(...skipping 13 matching lines...) Expand all
211 const Widget* ancestor, gfx::Point* point) const = 0; 206 const Widget* ancestor, gfx::Point* point) const = 0;
212 207
213 // Overridden from NativeWidget: 208 // Overridden from NativeWidget:
214 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE; 209 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE;
215 }; 210 };
216 211
217 } // namespace internal 212 } // namespace internal
218 } // namespace views 213 } // namespace views
219 214
220 #endif // VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 215 #endif // VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_
OLDNEW
« no previous file with comments | « views/widget/native_widget_gtk.cc ('k') | views/widget/native_widget_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698