summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit_view_win.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 01:07:27 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 01:07:27 +0000
commit9b2ab5910c58603ec655bb613bec7596e732f87b (patch)
tree36ffb5af12e8f97cda70d58bc2806e11e88e3d5b /chrome/browser/autocomplete/autocomplete_edit_view_win.h
parent5ea0531c8ca788207d7e5c2b5c95a9127916a73a (diff)
downloadchromium_src-9b2ab5910c58603ec655bb613bec7596e732f87b.zip
chromium_src-9b2ab5910c58603ec655bb613bec7596e732f87b.tar.gz
chromium_src-9b2ab5910c58603ec655bb613bec7596e732f87b.tar.bz2
Adds the ability for classes other than native control to process
messages bounced to the parent and wires it up for autocompleteedit, which I'm going to need shortly. BUG=none TEST=none Review URL: http://codereview.chromium.org/4637002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_win.h')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
index c0abab6..fdeaca6 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
@@ -22,8 +22,9 @@
#include "chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h"
#include "chrome/common/page_transition_types.h"
#include "gfx/font.h"
-#include "webkit/glue/window_open_disposition.h"
#include "views/controls/menu/menu_2.h"
+#include "views/widget/child_window_message_processor.h"
+#include "webkit/glue/window_open_disposition.h"
class Profile;
class TabContents;
@@ -31,6 +32,12 @@ namespace views {
class View;
}
+namespace app {
+namespace win {
+class ScopedProp;
+}
+}
+
class AutocompleteEditController;
class AutocompleteEditModel;
class AutocompleteEditView;
@@ -46,6 +53,7 @@ class AutocompleteEditViewWin
ES_NOHIDESEL> >,
public CRichEditCommands<AutocompleteEditViewWin>,
public menus::SimpleMenuModel::Delegate,
+ public views::ChildWindowMessageProcessor,
public AutocompleteEditView {
public:
struct State {
@@ -174,6 +182,7 @@ class AutocompleteEditViewWin
MSG_WM_CONTEXTMENU(OnContextMenu)
MSG_WM_COPY(OnCopy)
MSG_WM_CUT(OnCut)
+ MSG_WM_DESTROY(OnDestroy)
MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject)
MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition)
MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeNotify)
@@ -212,6 +221,11 @@ class AutocompleteEditViewWin
virtual std::wstring GetLabelForCommandId(int command_id) const;
virtual void ExecuteCommand(int command_id);
+ // views::ChildWindowMessageProcessor
+ virtual bool ProcessMessage(UINT message,
+ WPARAM w_param,
+ LPARAM l_param,
+ LRESULT* result);
private:
enum MouseButton {
kLeft = 0,
@@ -267,6 +281,7 @@ class AutocompleteEditViewWin
void OnContextMenu(HWND window, const CPoint& point);
void OnCopy();
void OnCut();
+ void OnDestroy();
LRESULT OnGetObject(UINT uMsg, WPARAM wparam, LPARAM lparam);
LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam);
LRESULT OnImeNotify(UINT message, WPARAM wparam, LPARAM lparam);
@@ -519,6 +534,9 @@ class AutocompleteEditViewWin
// Instance of accessibility information and handling.
mutable ScopedComPtr<IAccessible> autocomplete_accessibility_;
+ // ScopedProp returned from registering as a ChildWindowMessageProcessor.
+ scoped_ptr<app::win::ScopedProp> message_handler_prop_;
+
DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewWin);
};