Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: ui/views/controls/combobox/native_combobox_views.cc

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/combobox/native_combobox_views.h ('k') | ui/views/controls/link.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ShowDropDownMenu(); 85 ShowDropDownMenu();
86 } 86 }
87 87
88 return true; 88 return true;
89 } 89 }
90 90
91 bool NativeComboboxViews::OnMouseDragged(const ui::MouseEvent& mouse_event) { 91 bool NativeComboboxViews::OnMouseDragged(const ui::MouseEvent& mouse_event) {
92 return true; 92 return true;
93 } 93 }
94 94
95 ui::GestureStatus NativeComboboxViews::OnGestureEvent( 95 ui::EventResult NativeComboboxViews::OnGestureEvent(
96 const ui::GestureEvent& gesture_event) { 96 const ui::GestureEvent& gesture_event) {
97 if (gesture_event.type() == ui::ET_GESTURE_TAP) { 97 if (gesture_event.type() == ui::ET_GESTURE_TAP) {
98 UpdateFromModel(); 98 UpdateFromModel();
99 ShowDropDownMenu(); 99 ShowDropDownMenu();
100 return ui::GESTURE_STATUS_CONSUMED; 100 return ui::ER_CONSUMED;
101 } 101 }
102 return View::OnGestureEvent(gesture_event); 102 return View::OnGestureEvent(gesture_event);
103 } 103 }
104 104
105 bool NativeComboboxViews::OnKeyPressed(const ui::KeyEvent& key_event) { 105 bool NativeComboboxViews::OnKeyPressed(const ui::KeyEvent& key_event) {
106 // TODO(oshima): handle IME. 106 // TODO(oshima): handle IME.
107 DCHECK_EQ(key_event.type(), ui::ET_KEY_PRESSED); 107 DCHECK_EQ(key_event.type(), ui::ET_KEY_PRESSED);
108 108
109 // Check if we are in the default state (-1) and set to first item. 109 // Check if we are in the default state (-1) and set to first item.
110 if (selected_index_ == -1) 110 if (selected_index_ == -1)
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 #if defined(USE_AURA) 368 #if defined(USE_AURA)
369 // static 369 // static
370 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( 370 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper(
371 Combobox* combobox) { 371 Combobox* combobox) {
372 return new NativeComboboxViews(combobox); 372 return new NativeComboboxViews(combobox);
373 } 373 }
374 #endif 374 #endif
375 375
376 } // namespace views 376 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/native_combobox_views.h ('k') | ui/views/controls/link.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698