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 #include "ui/views/controls/combobox/native_combobox_views.h" | 5 #include "ui/views/controls/combobox/native_combobox_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 return true; | 82 return true; |
83 } | 83 } |
84 | 84 |
85 bool NativeComboboxViews::OnMouseDragged(const ui::MouseEvent& mouse_event) { | 85 bool NativeComboboxViews::OnMouseDragged(const ui::MouseEvent& mouse_event) { |
86 return true; | 86 return true; |
87 } | 87 } |
88 | 88 |
89 ui::GestureStatus NativeComboboxViews::OnGestureEvent( | 89 ui::GestureStatus NativeComboboxViews::OnGestureEvent( |
90 const views::GestureEvent& gesture_event) { | 90 const ui::GestureEvent& gesture_event) { |
91 if (gesture_event.type() == ui::ET_GESTURE_TAP) { | 91 if (gesture_event.type() == ui::ET_GESTURE_TAP) { |
92 UpdateFromModel(); | 92 UpdateFromModel(); |
93 ShowDropDownMenu(); | 93 ShowDropDownMenu(); |
94 return ui::GESTURE_STATUS_CONSUMED; | 94 return ui::GESTURE_STATUS_CONSUMED; |
95 } | 95 } |
96 return View::OnGestureEvent(gesture_event); | 96 return View::OnGestureEvent(gesture_event); |
97 } | 97 } |
98 | 98 |
99 bool NativeComboboxViews::OnKeyPressed(const ui::KeyEvent& key_event) { | 99 bool NativeComboboxViews::OnKeyPressed(const ui::KeyEvent& key_event) { |
100 // TODO(oshima): handle IME. | 100 // TODO(oshima): handle IME. |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 #if defined(USE_AURA) | 359 #if defined(USE_AURA) |
360 // static | 360 // static |
361 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( | 361 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( |
362 Combobox* combobox) { | 362 Combobox* combobox) { |
363 return new NativeComboboxViews(combobox); | 363 return new NativeComboboxViews(combobox); |
364 } | 364 } |
365 #endif | 365 #endif |
366 | 366 |
367 } // namespace views | 367 } // namespace views |
OLD | NEW |