| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 WPARAM w_param, | 30 WPARAM w_param, |
| 31 LPARAM l_param, | 31 LPARAM l_param, |
| 32 LRESULT* result); | 32 LRESULT* result); |
| 33 | 33 |
| 34 // Called by our subclassed window procedure when a WM_KEYDOWN message is | 34 // Called by our subclassed window procedure when a WM_KEYDOWN message is |
| 35 // received by the HWND created by an object derived from NativeControlWin. | 35 // received by the HWND created by an object derived from NativeControlWin. |
| 36 // Returns true if the key was processed, false otherwise. | 36 // Returns true if the key was processed, false otherwise. |
| 37 virtual bool OnKeyDown(int vkey) { return false; } | 37 virtual bool OnKeyDown(int vkey) { return false; } |
| 38 | 38 |
| 39 // Overridden from View: | 39 // Overridden from View: |
| 40 virtual void SetEnabled(bool enabled); | 40 virtual void OnEnabledChanged(); |
| 41 | 41 |
| 42 protected: | 42 protected: |
| 43 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); | 43 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); |
| 44 virtual void VisibilityChanged(View* starting_from, bool is_visible); | 44 virtual void VisibilityChanged(View* starting_from, bool is_visible); |
| 45 virtual void OnFocus(); | 45 virtual void OnFocus(); |
| 46 | 46 |
| 47 // Called by the containing NativeWidgetWin when a WM_CONTEXTMENU message is | 47 // Called by the containing NativeWidgetWin when a WM_CONTEXTMENU message is |
| 48 // received from the HWND created by an object derived from NativeControlWin. | 48 // received from the HWND created by an object derived from NativeControlWin. |
| 49 virtual void ShowContextMenu(const gfx::Point& location); | 49 virtual void ShowContextMenu(const gfx::Point& location); |
| 50 | 50 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 WNDPROC original_wndproc_; | 90 WNDPROC original_wndproc_; |
| 91 | 91 |
| 92 ViewProps props_; | 92 ViewProps props_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(NativeControlWin); | 94 DISALLOW_COPY_AND_ASSIGN(NativeControlWin); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace views | 97 } // namespace views |
| 98 | 98 |
| 99 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ | 99 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ |
| OLD | NEW |