| OLD | NEW | 
|    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 namespace win { |   16 class ViewProp; | 
|   17 class ScopedProp; |  | 
|   18 } |  | 
|   19 } |   17 } | 
|   20  |   18  | 
|   21 namespace views { |   19 namespace views { | 
|   22  |   20  | 
|   23 // A View that hosts a native Windows control. |   21 // A View that hosts a native Windows control. | 
|   24 class NativeControlWin : public ChildWindowMessageProcessor, |   22 class NativeControlWin : public ChildWindowMessageProcessor, | 
|   25                          public NativeViewHost { |   23                          public NativeViewHost { | 
|   26  public: |   24  public: | 
|   27   NativeControlWin(); |   25   NativeControlWin(); | 
|   28   virtual ~NativeControlWin(); |   26   virtual ~NativeControlWin(); | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   68   // to the HWND for views with right-to-left UI layout. |   66   // to the HWND for views with right-to-left UI layout. | 
|   69   DWORD GetAdditionalExStyle() const; |   67   DWORD GetAdditionalExStyle() const; | 
|   70  |   68  | 
|   71   // TODO(xji): we use the following temporary function as we transition the |   69   // TODO(xji): we use the following temporary function as we transition the | 
|   72   // various native controls to use the right set of RTL flags. This function |   70   // various native controls to use the right set of RTL flags. This function | 
|   73   // will go away (and be replaced by GetAdditionalExStyle()) once all the |   71   // will go away (and be replaced by GetAdditionalExStyle()) once all the | 
|   74   // controls are properly transitioned. |   72   // controls are properly transitioned. | 
|   75   DWORD GetAdditionalRTLStyle() const; |   73   DWORD GetAdditionalRTLStyle() const; | 
|   76  |   74  | 
|   77  private: |   75  private: | 
|   78   typedef ScopedVector<app::win::ScopedProp> ScopedProps; |   76   typedef ScopedVector<app::ViewProp> ViewProps; | 
|   79  |   77  | 
|   80   // Called by the containing WidgetWin when a message of type WM_CTLCOLORBTN or |   78   // Called by the containing WidgetWin when a message of type WM_CTLCOLORBTN or | 
|   81   // WM_CTLCOLORSTATIC is sent from the HWND created by an object dreived from |   79   // WM_CTLCOLORSTATIC is sent from the HWND created by an object dreived from | 
|   82   // NativeControlWin. |   80   // NativeControlWin. | 
|   83   LRESULT GetControlColor(UINT message, HDC dc, HWND sender); |   81   LRESULT GetControlColor(UINT message, HDC dc, HWND sender); | 
|   84  |   82  | 
|   85   // Our subclass window procedure for the attached control. |   83   // Our subclass window procedure for the attached control. | 
|   86   static LRESULT CALLBACK NativeControlWndProc(HWND window, |   84   static LRESULT CALLBACK NativeControlWndProc(HWND window, | 
|   87                                                UINT message, |   85                                                UINT message, | 
|   88                                                WPARAM w_param, |   86                                                WPARAM w_param, | 
|   89                                                LPARAM l_param); |   87                                                LPARAM l_param); | 
|   90  |   88  | 
|   91   // The window procedure before we subclassed. |   89   // The window procedure before we subclassed. | 
|   92   WNDPROC original_wndproc_; |   90   WNDPROC original_wndproc_; | 
|   93  |   91  | 
|   94   ScopedProps props_; |   92   ViewProps props_; | 
|   95  |   93  | 
|   96   DISALLOW_COPY_AND_ASSIGN(NativeControlWin); |   94   DISALLOW_COPY_AND_ASSIGN(NativeControlWin); | 
|   97 }; |   95 }; | 
|   98  |   96  | 
|   99 }  // namespace views |   97 }  // namespace views | 
|  100  |   98  | 
|  101 #endif  // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ |   99 #endif  // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ | 
| OLD | NEW |