OLD | NEW |
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_GFX_WIN_WINDOW_IMPL_H_ | 5 #ifndef UI_GFX_WIN_WINDOW_IMPL_H_ |
6 #define UI_GFX_WIN_WINDOW_IMPL_H_ | 6 #define UI_GFX_WIN_WINDOW_IMPL_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlapp.h> | 9 #include <atlapp.h> |
10 #include <atlmisc.h> | 10 #include <atlmisc.h> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 // Initializes the Window with a parent and an initial desired size. | 48 // Initializes the Window with a parent and an initial desired size. |
49 void Init(HWND parent, const gfx::Rect& bounds); | 49 void Init(HWND parent, const gfx::Rect& bounds); |
50 | 50 |
51 // Returns the default window icon to use for windows of this type. | 51 // Returns the default window icon to use for windows of this type. |
52 virtual HICON GetDefaultWindowIcon() const; | 52 virtual HICON GetDefaultWindowIcon() const; |
53 | 53 |
54 // Returns the HWND associated with this Window. | 54 // Returns the HWND associated with this Window. |
55 HWND hwnd() const { return hwnd_; } | 55 HWND hwnd() const { return hwnd_; } |
56 | 56 |
| 57 // Marks the window as destroyed, setting the hwnd to NULL. |
| 58 void SetDestroyed(); |
| 59 |
57 // Sets the window styles. This is ONLY used when the window is created. | 60 // Sets the window styles. This is ONLY used when the window is created. |
58 // In other words, if you invoke this after invoking Init, nothing happens. | 61 // In other words, if you invoke this after invoking Init, nothing happens. |
59 void set_window_style(DWORD style) { window_style_ = style; } | 62 void set_window_style(DWORD style) { window_style_ = style; } |
60 DWORD window_style() const { return window_style_; } | 63 DWORD window_style() const { return window_style_; } |
61 | 64 |
62 // Sets the extended window styles. See comment about |set_window_style|. | 65 // Sets the extended window styles. See comment about |set_window_style|. |
63 void set_window_ex_style(DWORD style) { window_ex_style_ = style; } | 66 void set_window_ex_style(DWORD style) { window_ex_style_ = style; } |
64 DWORD window_ex_style() const { return window_ex_style_; } | 67 DWORD window_ex_style() const { return window_ex_style_; } |
65 | 68 |
66 // Sets the class style to use. The default is CS_DBLCLKS. | 69 // Sets the class style to use. The default is CS_DBLCLKS. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 bool got_create_; | 117 bool got_create_; |
115 bool got_valid_hwnd_; | 118 bool got_valid_hwnd_; |
116 bool* destroyed_; | 119 bool* destroyed_; |
117 | 120 |
118 DISALLOW_COPY_AND_ASSIGN(WindowImpl); | 121 DISALLOW_COPY_AND_ASSIGN(WindowImpl); |
119 }; | 122 }; |
120 | 123 |
121 } // namespace gfx | 124 } // namespace gfx |
122 | 125 |
123 #endif // UI_GFX_WIN_WINDOW_IMPL_H_ | 126 #endif // UI_GFX_WIN_WINDOW_IMPL_H_ |
OLD | NEW |