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

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

Issue 114059: Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match t... (Closed) Base URL: svn://chrome-svn/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_control_gtk.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/hwnd_view.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 HWNDView { 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.
(...skipping 29 matching lines...) Expand all
53 // has been created. 53 // has been created.
54 virtual bool NotifyOnKeyDown() const { return false; } 54 virtual bool NotifyOnKeyDown() const { return false; }
55 55
56 // Called when the NativeControlWin is attached to a View hierarchy with a 56 // Called when the NativeControlWin is attached to a View hierarchy with a
57 // valid Widget. The NativeControlWin should use this opportunity to create 57 // valid Widget. The NativeControlWin should use this opportunity to create
58 // its associated HWND. 58 // its associated HWND.
59 virtual void CreateNativeControl() = 0; 59 virtual void CreateNativeControl() = 0;
60 60
61 // MUST be called by the subclass implementation of |CreateNativeControl| 61 // MUST be called by the subclass implementation of |CreateNativeControl|
62 // immediately after creating the control HWND, otherwise it won't be attached 62 // immediately after creating the control HWND, otherwise it won't be attached
63 // to the HWNDView and will be effectively orphaned. 63 // to the NativeViewHost and will be effectively orphaned.
64 virtual void NativeControlCreated(HWND native_control); 64 virtual void NativeControlCreated(HWND native_control);
65 65
66 // Returns additional extended style flags. When subclasses call 66 // Returns additional extended style flags. When subclasses call
67 // CreateWindowEx in order to create the underlying control, they must OR the 67 // CreateWindowEx in order to create the underlying control, they must OR the
68 // ExStyle parameter with the value returned by this function. 68 // ExStyle parameter with the value returned by this function.
69 // 69 //
70 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL 70 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL
71 // to the HWND for views with right-to-left UI layout. 71 // to the HWND for views with right-to-left UI layout.
72 DWORD GetAdditionalExStyle() const; 72 DWORD GetAdditionalExStyle() const;
73 73
(...skipping 17 matching lines...) Expand all
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_control_gtk.cc ('k') | views/controls/native_control_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698