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_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 5 #ifndef VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/controls/combobox/native_combobox_wrapper.h" | 9 #include "views/controls/combobox/native_combobox_wrapper.h" |
10 #include "views/controls/menu/menu_delegate.h" | 10 #include "views/controls/menu/menu_delegate.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual bool HandleKeyPressed(const views::KeyEvent& event) OVERRIDE; | 51 virtual bool HandleKeyPressed(const views::KeyEvent& event) OVERRIDE; |
52 virtual bool HandleKeyReleased(const views::KeyEvent& event) OVERRIDE; | 52 virtual bool HandleKeyReleased(const views::KeyEvent& event) OVERRIDE; |
53 virtual void HandleFocus() OVERRIDE; | 53 virtual void HandleFocus() OVERRIDE; |
54 virtual void HandleBlur() OVERRIDE; | 54 virtual void HandleBlur() OVERRIDE; |
55 virtual gfx::NativeView GetTestingHandle() const OVERRIDE; | 55 virtual gfx::NativeView GetTestingHandle() const OVERRIDE; |
56 | 56 |
57 // MenuDelegate overrides: | 57 // MenuDelegate overrides: |
58 virtual bool IsItemChecked(int id) const OVERRIDE; | 58 virtual bool IsItemChecked(int id) const OVERRIDE; |
59 virtual bool IsCommandEnabled(int id) const OVERRIDE; | 59 virtual bool IsCommandEnabled(int id) const OVERRIDE; |
60 virtual void ExecuteCommand(int id) OVERRIDE; | 60 virtual void ExecuteCommand(int id) OVERRIDE; |
61 virtual bool GetAccelerator(int id, views::Accelerator* accelerator) OVERRIDE; | 61 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) OVERRIDE; |
62 | 62 |
63 // class name of internal | 63 // class name of internal |
64 static const char kViewClassName[]; | 64 static const char kViewClassName[]; |
65 | 65 |
66 private: | 66 private: |
67 // Returns the Combobox's font. | 67 // Returns the Combobox's font. |
68 const gfx::Font& GetFont() const; | 68 const gfx::Font& GetFont() const; |
69 | 69 |
70 // Draw an arrow | 70 // Draw an arrow |
71 void DrawArrow(gfx::Canvas* canvas, | 71 void DrawArrow(gfx::Canvas* canvas, |
(...skipping 23 matching lines...) Expand all Loading... |
95 // The maximum dimensions of the content in the dropdown | 95 // The maximum dimensions of the content in the dropdown |
96 int content_width_; | 96 int content_width_; |
97 int content_height_; | 97 int content_height_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); | 99 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); |
100 }; | 100 }; |
101 | 101 |
102 } // namespace views | 102 } // namespace views |
103 | 103 |
104 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 104 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
OLD | NEW |