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 APP_WIN_WINDOW_IMPL_H_ | 5 #ifndef APP_WIN_WINDOW_IMPL_H_ |
6 #define APP_WIN_WINDOW_IMPL_H_ | 6 #define APP_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 DWORD window_ex_style() const { return window_ex_style_; } | 63 DWORD window_ex_style() const { return window_ex_style_; } |
64 | 64 |
65 // Sets the class style to use. The default is CS_DBLCLKS. | 65 // Sets the class style to use. The default is CS_DBLCLKS. |
66 void set_initial_class_style(UINT class_style) { | 66 void set_initial_class_style(UINT class_style) { |
67 // We dynamically generate the class name, so don't register it globally! | 67 // We dynamically generate the class name, so don't register it globally! |
68 DCHECK_EQ((class_style & CS_GLOBALCLASS), 0); | 68 DCHECK_EQ((class_style & CS_GLOBALCLASS), 0); |
69 class_style_ = class_style; | 69 class_style_ = class_style; |
70 } | 70 } |
71 UINT initial_class_style() const { return class_style_; } | 71 UINT initial_class_style() const { return class_style_; } |
72 | 72 |
| 73 // Returns true if the specified |hwnd| is a WindowImpl. |
| 74 static bool IsWindowImpl(HWND hwnd); |
| 75 |
73 protected: | 76 protected: |
74 // Handles the WndProc callback for this object. | 77 // Handles the WndProc callback for this object. |
75 virtual LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param); | 78 virtual LRESULT OnWndProc(UINT message, WPARAM w_param, LPARAM l_param); |
76 | 79 |
77 private: | 80 private: |
78 friend class ClassRegistrar; | 81 friend class ClassRegistrar; |
79 | 82 |
80 // The window procedure used by all Windows. | 83 // The window procedure used by all Windows. |
81 static LRESULT CALLBACK WndProc(HWND window, | 84 static LRESULT CALLBACK WndProc(HWND window, |
82 UINT message, | 85 UINT message, |
(...skipping 18 matching lines...) Expand all 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 app | 111 } // namespace app |
109 | 112 |
110 #endif // APP_WIN_WINDOW_IMPL_H_ | 113 #endif // APP_WIN_WINDOW_IMPL_H_ |
OLD | NEW |