OLD | NEW |
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_WINDOW_NATIVE_WINDOW_WIN_H_ | 5 #ifndef VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ |
6 #define VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ | 6 #define VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/widget/native_widget_win.h" | 9 #include "views/widget/native_widget_win.h" |
10 #include "views/window/native_window.h" | 10 #include "views/window/native_window.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool* maximized) const OVERRIDE; | 144 bool* maximized) const OVERRIDE; |
145 virtual void EnableClose(bool enable) OVERRIDE; | 145 virtual void EnableClose(bool enable) OVERRIDE; |
146 virtual void SetWindowTitle(const std::wstring& title) OVERRIDE; | 146 virtual void SetWindowTitle(const std::wstring& title) OVERRIDE; |
147 virtual void SetWindowIcons(const SkBitmap& window_icon, | 147 virtual void SetWindowIcons(const SkBitmap& window_icon, |
148 const SkBitmap& app_icon) OVERRIDE; | 148 const SkBitmap& app_icon) OVERRIDE; |
149 virtual void SetAccessibleName(const std::wstring& name) OVERRIDE; | 149 virtual void SetAccessibleName(const std::wstring& name) OVERRIDE; |
150 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE; | 150 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE; |
151 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE; | 151 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE; |
152 virtual void SetWindowBounds(const gfx::Rect& bounds, | 152 virtual void SetWindowBounds(const gfx::Rect& bounds, |
153 gfx::NativeWindow other_window) OVERRIDE; | 153 gfx::NativeWindow other_window) OVERRIDE; |
| 154 virtual void HideWindow() OVERRIDE; |
| 155 virtual void Activate() OVERRIDE; |
| 156 virtual void Deactivate() OVERRIDE; |
| 157 virtual void Maximize() OVERRIDE; |
| 158 virtual void Minimize() OVERRIDE; |
| 159 virtual void Restore() OVERRIDE; |
| 160 virtual bool IsActive() const OVERRIDE; |
| 161 virtual bool IsVisible() const OVERRIDE; |
| 162 virtual bool IsMaximized() const OVERRIDE; |
| 163 virtual bool IsMinimized() const OVERRIDE; |
154 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 164 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
155 virtual bool IsFullscreen() const OVERRIDE; | 165 virtual bool IsFullscreen() const OVERRIDE; |
| 166 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE; |
156 virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE; | 167 virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE; |
157 virtual NonClientFrameView* CreateFrameViewForWindow() OVERRIDE; | 168 virtual NonClientFrameView* CreateFrameViewForWindow() OVERRIDE; |
158 virtual void UpdateFrameAfterFrameChange() OVERRIDE; | 169 virtual void UpdateFrameAfterFrameChange() OVERRIDE; |
| 170 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
159 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 171 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
160 virtual void FrameTypeChanged() OVERRIDE; | 172 virtual void FrameTypeChanged() OVERRIDE; |
161 | 173 |
162 // Overridden from NativeWidgetWin: | |
163 virtual bool IsActive() const OVERRIDE; | |
164 | |
165 private: | 174 private: |
166 // Information saved before going into fullscreen mode, used to restore the | 175 // Information saved before going into fullscreen mode, used to restore the |
167 // window afterwards. | 176 // window afterwards. |
168 struct SavedWindowInfo { | 177 struct SavedWindowInfo { |
169 bool maximized; | 178 bool maximized; |
170 LONG style; | 179 LONG style; |
171 LONG ex_style; | 180 LONG ex_style; |
172 RECT window_rect; | 181 RECT window_rect; |
173 }; | 182 }; |
174 | 183 |
(...skipping 21 matching lines...) Expand all Loading... |
196 // Update accessibility information via our WindowDelegate. | 205 // Update accessibility information via our WindowDelegate. |
197 void UpdateAccessibleName(std::wstring& accessible_name); | 206 void UpdateAccessibleName(std::wstring& accessible_name); |
198 void UpdateAccessibleRole(); | 207 void UpdateAccessibleRole(); |
199 void UpdateAccessibleState(); | 208 void UpdateAccessibleState(); |
200 | 209 |
201 // Calls the default WM_NCACTIVATE handler with the specified activation | 210 // Calls the default WM_NCACTIVATE handler with the specified activation |
202 // value, safely wrapping the call in a ScopedRedrawLock to prevent frame | 211 // value, safely wrapping the call in a ScopedRedrawLock to prevent frame |
203 // flicker. | 212 // flicker. |
204 LRESULT CallDefaultNCActivateHandler(BOOL active); | 213 LRESULT CallDefaultNCActivateHandler(BOOL active); |
205 | 214 |
| 215 // Executes the specified SC_command. |
| 216 void ExecuteSystemMenuCommand(int command); |
| 217 |
206 // A delegate implementation that handles events received here. | 218 // A delegate implementation that handles events received here. |
207 internal::NativeWindowDelegate* delegate_; | 219 internal::NativeWindowDelegate* delegate_; |
208 | 220 |
209 // Whether we should SetFocus() on a newly created window after | 221 // Whether we should SetFocus() on a newly created window after |
210 // Init(). Defaults to true. | 222 // Init(). Defaults to true. |
211 bool focus_on_creation_; | 223 bool focus_on_creation_; |
212 | 224 |
213 // Whether all ancestors have been enabled. This is only used if is_modal_ is | 225 // Whether all ancestors have been enabled. This is only used if is_modal_ is |
214 // true. | 226 // true. |
215 bool restored_enabled_; | 227 bool restored_enabled_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // The window styles before we modified them for the drag frame appearance. | 268 // The window styles before we modified them for the drag frame appearance. |
257 DWORD drag_frame_saved_window_style_; | 269 DWORD drag_frame_saved_window_style_; |
258 DWORD drag_frame_saved_window_ex_style_; | 270 DWORD drag_frame_saved_window_ex_style_; |
259 | 271 |
260 DISALLOW_COPY_AND_ASSIGN(NativeWindowWin); | 272 DISALLOW_COPY_AND_ASSIGN(NativeWindowWin); |
261 }; | 273 }; |
262 | 274 |
263 } // namespace views | 275 } // namespace views |
264 | 276 |
265 #endif // VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ | 277 #endif // VIEWS_WINDOW_NATIVE_WINDOW_WIN_H_ |
OLD | NEW |