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

Side by Side Diff: views/controls/native_control.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/native_view_host_wrapper.h ('k') | views/controls/native_control.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_H_
6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_ 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "views/view.h" 10 #include "views/view.h"
11 11
12 namespace WTL { 12 namespace WTL {
13 class CPoint; 13 class CPoint;
14 } 14 }
15 15
16 namespace views { 16 namespace views {
17 17
18 class HWNDView; 18 class NativeViewHost;
19 class NativeControlContainer; 19 class NativeControlContainer;
20 20
21 //////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////////
22 // 22 //
23 // NativeControl is an abstract view that is used to implement views wrapping 23 // NativeControl is an abstract view that is used to implement views wrapping
24 // native controls. Subclasses can simply implement CreateNativeControl() to 24 // native controls. Subclasses can simply implement CreateNativeControl() to
25 // wrap a new kind of control 25 // wrap a new kind of control
26 // 26 //
27 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
28 class NativeControl : public View { 28 class NativeControl : public View {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // TODO(xji): we use the following temporary function as we transition the 105 // TODO(xji): we use the following temporary function as we transition the
106 // various native controls to use the right set of RTL flags. This function 106 // various native controls to use the right set of RTL flags. This function
107 // will go away (and be replaced by GetAdditionalExStyle()) once all the 107 // will go away (and be replaced by GetAdditionalExStyle()) once all the
108 // controls are properly transitioned. 108 // controls are properly transitioned.
109 DWORD GetAdditionalRTLStyle() const; 109 DWORD GetAdditionalRTLStyle() const;
110 110
111 // This variable is protected to provide subclassers direct access. However 111 // This variable is protected to provide subclassers direct access. However
112 // subclassers should always check for NULL since this variable is only 112 // subclassers should always check for NULL since this variable is only
113 // initialized in ValidateNativeControl(). 113 // initialized in ValidateNativeControl().
114 HWNDView* hwnd_view_; 114 NativeViewHost* hwnd_view_;
115 115
116 // Fixed size information. -1 for a size means no fixed size. 116 // Fixed size information. -1 for a size means no fixed size.
117 int fixed_width_; 117 int fixed_width_;
118 Alignment horizontal_alignment_; 118 Alignment horizontal_alignment_;
119 int fixed_height_; 119 int fixed_height_;
120 Alignment vertical_alignment_; 120 Alignment vertical_alignment_;
121 121
122 private: 122 private:
123 123
124 void ValidateNativeControl(); 124 void ValidateNativeControl();
125 125
126 static LRESULT CALLBACK NativeControlWndProc(HWND window, UINT message, 126 static LRESULT CALLBACK NativeControlWndProc(HWND window, UINT message,
127 WPARAM w_param, LPARAM l_param); 127 WPARAM w_param, LPARAM l_param);
128 128
129 NativeControlContainer* container_; 129 NativeControlContainer* container_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(NativeControl); 131 DISALLOW_COPY_AND_ASSIGN(NativeControl);
132 }; 132 };
133 133
134 } // namespace views 134 } // namespace views
135 135
136 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ 136 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_
OLDNEW
« no previous file with comments | « views/controls/native/native_view_host_wrapper.h ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698