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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.h

Issue 13699002: add HideAndClose in preference to having Close sometimes magically defer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: non aura Created 7 years, 8 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 (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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_
7 7
8 #include "ui/aura/client/animation_host.h" 8 #include "ui/aura/client/animation_host.h"
9 #include "ui/aura/root_window_host.h" 9 #include "ui/aura/root_window_host.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual ~DesktopRootWindowHostWin(); 43 virtual ~DesktopRootWindowHostWin();
44 44
45 // A way of converting an HWND into a content window. 45 // A way of converting an HWND into a content window.
46 static aura::Window* GetContentWindowForHWND(HWND hwnd); 46 static aura::Window* GetContentWindowForHWND(HWND hwnd);
47 47
48 protected: 48 protected:
49 // Overridden from DesktopRootWindowHost: 49 // Overridden from DesktopRootWindowHost:
50 virtual aura::RootWindow* Init(aura::Window* content_window, 50 virtual aura::RootWindow* Init(aura::Window* content_window,
51 const Widget::InitParams& params) OVERRIDE; 51 const Widget::InitParams& params) OVERRIDE;
52 virtual void InitFocus(aura::Window* window) OVERRIDE; 52 virtual void InitFocus(aura::Window* window) OVERRIDE;
53 virtual bool SetCloseOnHideCompletion() OVERRIDE;
53 virtual void Close() OVERRIDE; 54 virtual void Close() OVERRIDE;
54 virtual void CloseNow() OVERRIDE; 55 virtual void CloseNow() OVERRIDE;
55 virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE; 56 virtual aura::RootWindowHost* AsRootWindowHost() OVERRIDE;
56 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE; 57 virtual void ShowWindowWithState(ui::WindowShowState show_state) OVERRIDE;
57 virtual void ShowMaximizedWithBounds( 58 virtual void ShowMaximizedWithBounds(
58 const gfx::Rect& restored_bounds) OVERRIDE; 59 const gfx::Rect& restored_bounds) OVERRIDE;
59 virtual bool IsVisible() const OVERRIDE; 60 virtual bool IsVisible() const OVERRIDE;
60 virtual void SetSize(const gfx::Size& size) OVERRIDE; 61 virtual void SetSize(const gfx::Size& size) OVERRIDE;
61 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; 62 virtual void CenterWindow(const gfx::Size& size) OVERRIDE;
62 virtual void GetWindowPlacement( 63 virtual void GetWindowPlacement(
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 scoped_ptr<views::corewm::CursorManager> cursor_client_; 241 scoped_ptr<views::corewm::CursorManager> cursor_client_;
241 242
242 scoped_ptr<DesktopDragDropClientWin> drag_drop_client_; 243 scoped_ptr<DesktopDragDropClientWin> drag_drop_client_;
243 244
244 // Extra size added to the host window. Typically, the window size matches 245 // Extra size added to the host window. Typically, the window size matches
245 // the contained content, however, when performing a translating or scaling 246 // the contained content, however, when performing a translating or scaling
246 // animation the window has to be enlarged so that the content is not 247 // animation the window has to be enlarged so that the content is not
247 // clipped. 248 // clipped.
248 gfx::Rect window_expansion_; 249 gfx::Rect window_expansion_;
249 250
250 // Whether the window close should be converted to a hide, and then actually
251 // closed on the completion of the hide animation. This is cached because
252 // the property is set on the contained window which has a shorter lifetime.
253 bool should_animate_window_close_;
254
255 // When Close()d and animations are being applied to this window, the close 251 // When Close()d and animations are being applied to this window, the close
256 // of the window needs to be deferred to when the close animation is 252 // of the window needs to be deferred to when the close animation is
257 // completed. This variable indicates that a Close was converted to a Hide, 253 // completed. This variable indicates that a Close was converted to a Hide,
258 // so that when the Hide is completed the host window should be closed. 254 // so that when the Hide is completed the host window should be closed.
259 bool pending_close_; 255 bool pending_close_;
260 256
261 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin); 257 DISALLOW_COPY_AND_ASSIGN(DesktopRootWindowHostWin);
262 }; 258 };
263 259
264 } // namespace views 260 } // namespace views
265 261
266 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_ 262 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_ROOT_WINDOW_HOST_WIN_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698