diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 22:55:03 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-04 22:55:03 +0000 |
commit | 7e24ec474cdcf17f2c97b6e8a7a153d790a032c1 (patch) | |
tree | 9d9150dfe2aa25c696076b69826e8b132f129edf /chrome/browser/autocomplete | |
parent | d11535a810717cd12a32a1a98080b2029c838547 (diff) | |
download | chromium_src-7e24ec474cdcf17f2c97b6e8a7a153d790a032c1.zip chromium_src-7e24ec474cdcf17f2c97b6e8a7a153d790a032c1.tar.gz chromium_src-7e24ec474cdcf17f2c97b6e8a7a153d790a032c1.tar.bz2 |
Revert 65109 - 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/4470001
TBR=sky@chromium.org
Review URL: http://codereview.chromium.org/4528001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 25 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_win.h | 20 |
2 files changed, 1 insertions, 44 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index b35abc1..328d55b 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -22,7 +22,6 @@ #include "app/win/drag_source.h" #include "app/win/drop_target.h" #include "app/win/iat_patch_function.h" -#include "app/win/scoped_prop.h" #include "base/auto_reset.h" #include "base/basictypes.h" #include "base/i18n/rtl.h" @@ -439,10 +438,6 @@ AutocompleteEditViewWin::AutocompleteEditViewWin( SendMessage(m_hWnd, EM_SETWORDBREAKPROC, 0, reinterpret_cast<LPARAM>(&WordBreakProc)); - // Makes it EN_SELCHANGE is sent to our parent window and back to us by way of - // ProcessWindowMessage. - SetEventMask(ENM_SELCHANGE); - // Get the metrics for the font. HDC dc = ::GetDC(NULL); SelectObject(dc, font_.GetNativeFont()); @@ -473,9 +468,6 @@ AutocompleteEditViewWin::AutocompleteEditViewWin( SetBackgroundColor(background_color_); - message_handler_prop_.reset( - views::ChildWindowMessageProcessor::Register(m_hWnd, this)); - // By default RichEdit has a drop target. Revoke it so that we can install our // own. Revoke takes care of deleting the existing one. RevokeDragDrop(m_hWnd); @@ -1064,19 +1056,6 @@ void AutocompleteEditViewWin::ExecuteCommand(int command_id) { OnAfterPossibleChange(); } -bool AutocompleteEditViewWin::ProcessMessage(UINT message, - WPARAM w_param, - LPARAM l_param, - LRESULT* result) { - if (message == WM_NOTIFY) { - NMHDR* header = reinterpret_cast<NMHDR*>(l_param); - if (header->code == EN_SELCHANGE) { - // TODO(sky): wire this up. - } - } - return false; -} - // static int CALLBACK AutocompleteEditViewWin::WordBreakProc(LPTSTR edit_text, int current_pos, @@ -1267,10 +1246,6 @@ void AutocompleteEditViewWin::OnCut() { ReplaceSel(L"", true); } -void AutocompleteEditViewWin::OnDestroy() { - message_handler_prop_.reset(); -} - LRESULT AutocompleteEditViewWin::OnGetObject(UINT uMsg, WPARAM wparam, LPARAM lparam) { diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h index fdeaca6..c0abab6 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h @@ -22,9 +22,8 @@ #include "chrome/browser/views/autocomplete/autocomplete_popup_contents_view.h" #include "chrome/common/page_transition_types.h" #include "gfx/font.h" -#include "views/controls/menu/menu_2.h" -#include "views/widget/child_window_message_processor.h" #include "webkit/glue/window_open_disposition.h" +#include "views/controls/menu/menu_2.h" class Profile; class TabContents; @@ -32,12 +31,6 @@ namespace views { class View; } -namespace app { -namespace win { -class ScopedProp; -} -} - class AutocompleteEditController; class AutocompleteEditModel; class AutocompleteEditView; @@ -53,7 +46,6 @@ class AutocompleteEditViewWin ES_NOHIDESEL> >, public CRichEditCommands<AutocompleteEditViewWin>, public menus::SimpleMenuModel::Delegate, - public views::ChildWindowMessageProcessor, public AutocompleteEditView { public: struct State { @@ -182,7 +174,6 @@ 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) @@ -221,11 +212,6 @@ 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, @@ -281,7 +267,6 @@ 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); @@ -534,9 +519,6 @@ 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); }; |