diff options
Diffstat (limited to 'views/controls/native_control_win.h')
-rw-r--r-- | views/controls/native_control_win.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/views/controls/native_control_win.h b/views/controls/native_control_win.h index 6d0fdf0..3733a15 100644 --- a/views/controls/native_control_win.h +++ b/views/controls/native_control_win.h @@ -7,8 +7,10 @@ #pragma once #include "base/scoped_ptr.h" +#include "base/scoped_vector.h" #include "views/controls/combobox/combobox.h" #include "views/controls/native/native_view_host.h" +#include "views/widget/child_window_message_processor.h" namespace app { namespace win { @@ -19,19 +21,13 @@ class ScopedProp; namespace views { // A View that hosts a native Windows control. -class NativeControlWin : public NativeViewHost { +class NativeControlWin : public ChildWindowMessageProcessor, + public NativeViewHost { public: - static const wchar_t* kNativeControlWinKey; - NativeControlWin(); virtual ~NativeControlWin(); - // Called by the containing WidgetWin when a message is received from the HWND - // created by an object derived from NativeControlWin. Derived classes MUST - // call _this_ version of the function if they override it and do not handle - // all of the messages listed in widget_win.cc ProcessNativeControlWinMessage. - // Returns true if the message was handled, with a valid result in |result|. - // Returns false if the message was not handled. + // Overridden from ChildWindowMessageProcessor: virtual bool ProcessMessage(UINT message, WPARAM w_param, LPARAM l_param, @@ -79,6 +75,8 @@ class NativeControlWin : public NativeViewHost { DWORD GetAdditionalRTLStyle() const; private: + typedef ScopedVector<app::win::ScopedProp> ScopedProps; + // Called by the containing WidgetWin when a message of type WM_CTLCOLORBTN or // WM_CTLCOLORSTATIC is sent from the HWND created by an object dreived from // NativeControlWin. @@ -93,7 +91,7 @@ class NativeControlWin : public NativeViewHost { // The window procedure before we subclassed. WNDPROC original_wndproc_; - scoped_ptr<app::win::ScopedProp> prop_; + ScopedProps props_; DISALLOW_COPY_AND_ASSIGN(NativeControlWin); }; |