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

Unified Diff: views/controls/native_control_win.h

Issue 4637002: Adds the ability for classes other than native control to process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Tweaks Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | views/controls/native_control_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/native_control_win.h
diff --git a/views/controls/native_control_win.h b/views/controls/native_control_win.h
index 6d0fdf0506beff5475615730b8887c0179108d45..3733a150499eafc0265ac1fa78f44af92db41dc7 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);
};
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.cc ('k') | views/controls/native_control_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698