| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/views/controls/combobox/native_combobox_wrapper.h" | 9 #include "ui/views/controls/combobox/native_combobox_wrapper.h" |
| 10 #include "ui/views/controls/menu/menu_delegate.h" | 10 #include "ui/views/controls/menu/menu_delegate.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class MenuRunner; | 21 class MenuRunner; |
| 22 | 22 |
| 23 // A views/skia only implementation of NativeComboboxWrapper. | 23 // A views/skia only implementation of NativeComboboxWrapper. |
| 24 // No platform specific code is used. | 24 // No platform specific code is used. |
| 25 class NativeComboboxViews : public views::View, | 25 class NativeComboboxViews : public views::View, |
| 26 public NativeComboboxWrapper, | 26 public NativeComboboxWrapper, |
| 27 public views::MenuDelegate { | 27 public views::MenuDelegate { |
| 28 public: | 28 public: |
| 29 static const char kViewClassName[]; | 29 static const char kViewClassName[]; |
| 30 | 30 |
| 31 explicit NativeComboboxViews(Combobox* combo_box); | 31 explicit NativeComboboxViews(Combobox* combobox); |
| 32 virtual ~NativeComboboxViews(); | 32 virtual ~NativeComboboxViews(); |
| 33 | 33 |
| 34 // views::View overrides: | 34 // views::View overrides: |
| 35 virtual bool OnMousePressed(const views::MouseEvent& mouse_event) OVERRIDE; | 35 virtual bool OnMousePressed(const views::MouseEvent& mouse_event) OVERRIDE; |
| 36 virtual bool OnMouseDragged(const views::MouseEvent& mouse_event) OVERRIDE; | 36 virtual bool OnMouseDragged(const views::MouseEvent& mouse_event) OVERRIDE; |
| 37 virtual bool OnKeyPressed(const views::KeyEvent& key_event) OVERRIDE; | 37 virtual bool OnKeyPressed(const views::KeyEvent& key_event) OVERRIDE; |
| 38 virtual bool OnKeyReleased(const views::KeyEvent& key_event) OVERRIDE; | 38 virtual bool OnKeyReleased(const views::KeyEvent& key_event) OVERRIDE; |
| 39 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 39 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 40 virtual void OnFocus() OVERRIDE; | 40 virtual void OnFocus() OVERRIDE; |
| 41 virtual void OnBlur() OVERRIDE; | 41 virtual void OnBlur() OVERRIDE; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // The maximum dimensions of the content in the dropdown | 94 // The maximum dimensions of the content in the dropdown |
| 95 int content_width_; | 95 int content_width_; |
| 96 int content_height_; | 96 int content_height_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); | 98 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace views | 101 } // namespace views |
| 102 | 102 |
| 103 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 103 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| OLD | NEW |