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

Side by Side Diff: views/controls/native_control_win.h

Issue 113991: Make Combobox portable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months 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/controls/native/native_view_host_win.cc ('k') | views/controls/native_control_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_
6 #define VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_
7 7
8 #include "views/controls/native/native_view_host.h" 8 #include "views/controls/native/native_view_host.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 // A View that hosts a native Windows control. 12 // A View that hosts a native Windows control.
13 class NativeControlWin : public NativeViewHost { 13 class NativeControlWin : public NativeViewHost {
14 public: 14 public:
15 static const wchar_t* kNativeControlWinKey; 15 static const wchar_t* kNativeControlWinKey;
16 16
17 NativeControlWin(); 17 NativeControlWin();
18 virtual ~NativeControlWin(); 18 virtual ~NativeControlWin();
19 19
20 // Called by the containing WidgetWin when a message is received from the HWND 20 // Called by the containing WidgetWin when a message is received from the HWND
21 // created by an object derived from NativeControlWin. Derived classes MUST 21 // created by an object derived from NativeControlWin. Derived classes MUST
22 // call _this_ version of the function if they override it and do not handle 22 // call _this_ version of the function if they override it and do not handle
23 // all of the messages listed in widget_win.cc ProcessNativeControlWinMessage. 23 // all of the messages listed in widget_win.cc ProcessNativeControlWinMessage.
24 // Returns true if the message was handled, with a valid result in |result|. 24 // Returns true if the message was handled, with a valid result in |result|.
25 // Returns false if the message was not handled. 25 // Returns false if the message was not handled.
26 virtual bool ProcessMessage(UINT message, 26 virtual bool ProcessMessage(UINT message,
27 WPARAM w_param, 27 WPARAM w_param,
28 LPARAM l_param, 28 LPARAM l_param,
29 LRESULT* result); 29 LRESULT* result);
30 30
31 // Called by our subclassed window procedure when a WM_KEYDOWN message is 31 // Called by our subclassed window procedure when a WM_KEYDOWN message is
32 // received by the HWND created by an object derived from NativeControlWin. 32 // received by the HWND created by an object derived from NativeControlWin.
33 // Returns true if the key was processed, false otherwise. 33 // Returns true if the key was processed, false otherwise.
34 virtual bool OnKeyDown(int vkey) { return false; } 34 virtual bool OnKeyDown(int vkey) { return false; }
35 35
36 // Overridden from View: 36 // Overridden from View:
37 virtual void SetEnabled(bool enabled); 37 virtual void SetEnabled(bool enabled);
38 38
39 protected: 39 protected:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // The window procedure before we subclassed. 92 // The window procedure before we subclassed.
93 static WNDPROC original_wndproc_; 93 static WNDPROC original_wndproc_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(NativeControlWin); 95 DISALLOW_COPY_AND_ASSIGN(NativeControlWin);
96 }; 96 };
97 97
98 } // namespace views 98 } // namespace views
99 99
100 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ 100 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/native/native_view_host_win.cc ('k') | views/controls/native_control_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698