OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 BASE_WINDOW_IMPL_H_ | 5 #ifndef BASE_WINDOW_IMPL_H_ |
6 #define BASE_WINDOW_IMPL_H_ | 6 #define BASE_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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public: | 43 public: |
44 WindowImpl(); | 44 WindowImpl(); |
45 virtual ~WindowImpl(); | 45 virtual ~WindowImpl(); |
46 | 46 |
47 // Initializes the Window with a parent and an initial desired size. | 47 // Initializes the Window with a parent and an initial desired size. |
48 void Init(HWND parent, const gfx::Rect& bounds); | 48 void Init(HWND parent, const gfx::Rect& bounds); |
49 | 49 |
50 // Retrieves the default window icon to use for windows if none is specified. | 50 // Retrieves the default window icon to use for windows if none is specified. |
51 virtual HICON GetDefaultWindowIcon() const; | 51 virtual HICON GetDefaultWindowIcon() const; |
52 | 52 |
| 53 // Override this to be notified of the last message. |
| 54 virtual void OnFinalMessage(HWND window) {} |
| 55 |
53 // Returns the HWND associated with this Window. | 56 // Returns the HWND associated with this Window. |
54 HWND hwnd() const { return hwnd_; } | 57 HWND hwnd() const { return hwnd_; } |
55 | 58 |
56 // Sets the window styles. This is ONLY used when the window is created. | 59 // Sets the window styles. This is ONLY used when the window is created. |
57 // In other words, if you invoke this after invoking Init, nothing happens. | 60 // In other words, if you invoke this after invoking Init, nothing happens. |
58 void set_window_style(DWORD style) { window_style_ = style; } | 61 void set_window_style(DWORD style) { window_style_ = style; } |
59 DWORD window_style() const { return window_style_; } | 62 DWORD window_style() const { return window_style_; } |
60 | 63 |
61 // Sets the extended window styles. See comment about |set_window_style|. | 64 // Sets the extended window styles. See comment about |set_window_style|. |
62 void set_window_ex_style(DWORD style) { window_ex_style_ = style; } | 65 void set_window_ex_style(DWORD style) { window_ex_style_ = style; } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 104 |
102 // Our hwnd. | 105 // Our hwnd. |
103 HWND hwnd_; | 106 HWND hwnd_; |
104 | 107 |
105 DISALLOW_COPY_AND_ASSIGN(WindowImpl); | 108 DISALLOW_COPY_AND_ASSIGN(WindowImpl); |
106 }; | 109 }; |
107 | 110 |
108 } // namespace base | 111 } // namespace base |
109 | 112 |
110 #endif // BASE_WINDOW_IMPL_H_ | 113 #endif // BASE_WINDOW_IMPL_H_ |
OLD | NEW |