diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-21 17:18:14 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-21 17:18:14 +0000 |
commit | d57afa518d4ad5192b5a2d0f7227b2ddebd21ab9 (patch) | |
tree | 0f26ebcbcb4708db3b4520ba46929bc6a3727d1d /ui/views/widget/child_window_message_processor.cc | |
parent | c999f81499325506e3be3e373b1637bc3d71e85e (diff) | |
download | chromium_src-d57afa518d4ad5192b5a2d0f7227b2ddebd21ab9.zip chromium_src-d57afa518d4ad5192b5a2d0f7227b2ddebd21ab9.tar.gz chromium_src-d57afa518d4ad5192b5a2d0f7227b2ddebd21ab9.tar.bz2 |
views: Move widget/ directory to ui/views.
BUG=104039
R=ben@chromium.org
Review URL: http://codereview.chromium.org/8598031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget/child_window_message_processor.cc')
-rw-r--r-- | ui/views/widget/child_window_message_processor.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ui/views/widget/child_window_message_processor.cc b/ui/views/widget/child_window_message_processor.cc new file mode 100644 index 0000000..dc49756 --- /dev/null +++ b/ui/views/widget/child_window_message_processor.cc @@ -0,0 +1,28 @@ +// Copyright (c) 2011 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 "ui/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 |