OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/widget/child_window_message_processor.h" | 5 #include "views/widget/child_window_message_processor.h" |
6 | 6 |
7 #include "app/win/scoped_prop.h" | 7 #include "app/view_prop.h" |
| 8 #include "base/logging.h" |
| 9 |
| 10 #include "app/view_prop.h" |
8 | 11 |
9 namespace views { | 12 namespace views { |
10 | 13 |
11 static const wchar_t* kChildWindowKey = L"__CHILD_WINDOW_MESSAGE_PROCESSOR__"; | 14 static const char* const kChildWindowKey = "__CHILD_WINDOW_MESSAGE_PROCESSOR__"; |
12 | 15 |
13 // static | 16 // static |
14 app::win::ScopedProp* ChildWindowMessageProcessor::Register( | 17 ViewProp* ChildWindowMessageProcessor::Register( |
15 HWND hwnd, | 18 HWND hwnd, |
16 ChildWindowMessageProcessor* processor) { | 19 ChildWindowMessageProcessor* processor) { |
17 DCHECK(processor); | 20 DCHECK(processor); |
18 return new app::win::ScopedProp(hwnd, kChildWindowKey, processor); | 21 return new ViewProp(hwnd, kChildWindowKey, processor); |
19 } | 22 } |
20 | 23 |
21 // static | 24 // static |
22 ChildWindowMessageProcessor* ChildWindowMessageProcessor::Get(HWND hwnd) { | 25 ChildWindowMessageProcessor* ChildWindowMessageProcessor::Get(HWND hwnd) { |
23 return reinterpret_cast<ChildWindowMessageProcessor*>( | 26 return reinterpret_cast<ChildWindowMessageProcessor*>( |
24 ::GetProp(hwnd, kChildWindowKey)); | 27 ViewProp::GetValue(hwnd, kChildWindowKey)); |
25 } | 28 } |
26 | 29 |
27 } // namespace | 30 } // namespace |
OLD | NEW |