Index: views/widget/child_window_message_processor.cc |
diff --git a/views/widget/child_window_message_processor.cc b/views/widget/child_window_message_processor.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e1cfa3149c24d250130dd109b1fb4cf335afc1d8 |
--- /dev/null |
+++ b/views/widget/child_window_message_processor.cc |
@@ -0,0 +1,28 @@ |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "views/widget/child_window_message_processor.h" |
+ |
+#include "base/logging.h" |
+#include "ui/base/view_prop.h" |
+ |
+namespace views { |
+ |
+static const char* const kChildWindowKey = "__CHILD_WINDOW_MESSAGE_PROCESSOR__"; |
+ |
+// static |
+ui::ViewProp* ChildWindowMessageProcessor::Register( |
+ HWND hwnd, |
+ ChildWindowMessageProcessor* processor) { |
+ DCHECK(processor); |
+ return new ui::ViewProp(hwnd, kChildWindowKey, processor); |
+} |
+ |
+// static |
+ChildWindowMessageProcessor* ChildWindowMessageProcessor::Get(HWND hwnd) { |
+ return reinterpret_cast<ChildWindowMessageProcessor*>( |
+ ui::ViewProp::GetValue(hwnd, kChildWindowKey)); |
+} |
+ |
+} // namespace |