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

Side by Side Diff: views/widget/child_window_message_processor.h

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/widget/aero_tooltip_manager.cc ('k') | views/widget/child_window_message_processor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_WIDGET_CHILD_WINDOW_MESSAGE_PROCESSOR_H_
6 #define VIEWS_WIDGET_CHILD_WINDOW_MESSAGE_PROCESSOR_H_
7 #pragma once
8
9 #include <windows.h>
10
11 namespace ui {
12 class ViewProp;
13 }
14
15 namespace views {
16
17 // Windows sends a handful of messages to the parent window rather than the
18 // window itself. For example, selection changes of a rich edit (EN_SELCHANGE)
19 // are sent to the parent, not the window. Typically such message are best
20 // dealt with by the window rather than the parent. NativeWidgetWin allows for
21 // registering a ChildWindowMessageProcessor to handle such messages.
22 class ChildWindowMessageProcessor {
23 public:
24 // Registers |processor| for |hwnd|. The caller takes ownership of the
25 // returned object.
26 static ui::ViewProp* Register(HWND hwnd,
27 ChildWindowMessageProcessor* processor);
28
29 // Returns the ChildWindowMessageProcessor for |hwnd|, NULL if there isn't
30 // one.
31 static ChildWindowMessageProcessor* Get(HWND hwnd);
32
33 // Invoked for any messages that are sent to the parent and originated from
34 // the HWND this ChildWindowMessageProcessor was registered for. Returns true
35 // if the message was handled with a valid result in |result|. Returns false
36 // if the message was not handled.
37 virtual bool ProcessMessage(UINT message,
38 WPARAM w_param,
39 LPARAM l_param,
40 LRESULT* result) = 0;
41
42 protected:
43 virtual ~ChildWindowMessageProcessor() {}
44 };
45
46 } // namespace views
47
48 #endif // VIEWS_WIDGET_CHILD_WINDOW_MESSAGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « views/widget/aero_tooltip_manager.cc ('k') | views/widget/child_window_message_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698