Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: views/widget/child_window_message_processor.cc

Issue 4637002: Adds the ability for classes other than native control to process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Tweaks Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/child_window_message_processor.h ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a3b578eeca053425e8463e1d2bc8b38b6ee03c85
--- /dev/null
+++ b/views/widget/child_window_message_processor.cc
@@ -0,0 +1,27 @@
+// 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 "app/win/scoped_prop.h"
+
+namespace views {
+
+static const wchar_t* kChildWindowKey = L"__CHILD_WINDOW_MESSAGE_PROCESSOR__";
+
+// static
+app::win::ScopedProp* ChildWindowMessageProcessor::Register(
+ HWND hwnd,
+ ChildWindowMessageProcessor* processor) {
+ DCHECK(processor);
+ return new app::win::ScopedProp(hwnd, kChildWindowKey, processor);
+}
+
+// static
+ChildWindowMessageProcessor* ChildWindowMessageProcessor::Get(HWND hwnd) {
+ return reinterpret_cast<ChildWindowMessageProcessor*>(
+ ::GetProp(hwnd, kChildWindowKey));
+}
+
+} // namespace
« no previous file with comments | « views/widget/child_window_message_processor.h ('k') | views/widget/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698