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

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

Issue 5184009: Revert 66784 - Converts usage of SetProp/GetProp to a map. Even after making ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/native_control.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_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 #pragma once 7 #pragma once
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/scoped_vector.h" 10 #include "base/scoped_vector.h"
11 #include "views/controls/combobox/combobox.h" 11 #include "views/controls/combobox/combobox.h"
12 #include "views/controls/native/native_view_host.h" 12 #include "views/controls/native/native_view_host.h"
13 #include "views/widget/child_window_message_processor.h" 13 #include "views/widget/child_window_message_processor.h"
14 14
15 namespace app { 15 namespace app {
16 class ViewProp; 16 namespace win {
17 class ScopedProp;
18 }
17 } 19 }
18 20
19 namespace views { 21 namespace views {
20 22
21 // A View that hosts a native Windows control. 23 // A View that hosts a native Windows control.
22 class NativeControlWin : public ChildWindowMessageProcessor, 24 class NativeControlWin : public ChildWindowMessageProcessor,
23 public NativeViewHost { 25 public NativeViewHost {
24 public: 26 public:
25 NativeControlWin(); 27 NativeControlWin();
26 virtual ~NativeControlWin(); 28 virtual ~NativeControlWin();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // to the HWND for views with right-to-left UI layout. 68 // to the HWND for views with right-to-left UI layout.
67 DWORD GetAdditionalExStyle() const; 69 DWORD GetAdditionalExStyle() const;
68 70
69 // TODO(xji): we use the following temporary function as we transition the 71 // TODO(xji): we use the following temporary function as we transition the
70 // various native controls to use the right set of RTL flags. This function 72 // various native controls to use the right set of RTL flags. This function
71 // will go away (and be replaced by GetAdditionalExStyle()) once all the 73 // will go away (and be replaced by GetAdditionalExStyle()) once all the
72 // controls are properly transitioned. 74 // controls are properly transitioned.
73 DWORD GetAdditionalRTLStyle() const; 75 DWORD GetAdditionalRTLStyle() const;
74 76
75 private: 77 private:
76 typedef ScopedVector<app::ViewProp> ViewProps; 78 typedef ScopedVector<app::win::ScopedProp> ScopedProps;
77 79
78 // Called by the containing WidgetWin when a message of type WM_CTLCOLORBTN or 80 // Called by the containing WidgetWin when a message of type WM_CTLCOLORBTN or
79 // WM_CTLCOLORSTATIC is sent from the HWND created by an object dreived from 81 // WM_CTLCOLORSTATIC is sent from the HWND created by an object dreived from
80 // NativeControlWin. 82 // NativeControlWin.
81 LRESULT GetControlColor(UINT message, HDC dc, HWND sender); 83 LRESULT GetControlColor(UINT message, HDC dc, HWND sender);
82 84
83 // Our subclass window procedure for the attached control. 85 // Our subclass window procedure for the attached control.
84 static LRESULT CALLBACK NativeControlWndProc(HWND window, 86 static LRESULT CALLBACK NativeControlWndProc(HWND window,
85 UINT message, 87 UINT message,
86 WPARAM w_param, 88 WPARAM w_param,
87 LPARAM l_param); 89 LPARAM l_param);
88 90
89 // The window procedure before we subclassed. 91 // The window procedure before we subclassed.
90 WNDPROC original_wndproc_; 92 WNDPROC original_wndproc_;
91 93
92 ViewProps props_; 94 ScopedProps props_;
93 95
94 DISALLOW_COPY_AND_ASSIGN(NativeControlWin); 96 DISALLOW_COPY_AND_ASSIGN(NativeControlWin);
95 }; 97 };
96 98
97 } // namespace views 99 } // namespace views
98 100
99 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ 101 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/native_control.cc ('k') | views/controls/native_control_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698