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

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

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/label.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 content_height_(0) { 65 content_height_(0) {
66 set_border(text_border_); 66 set_border(text_border_);
67 } 67 }
68 68
69 NativeComboboxViews::~NativeComboboxViews() { 69 NativeComboboxViews::~NativeComboboxViews() {
70 } 70 }
71 71
72 //////////////////////////////////////////////////////////////////////////////// 72 ////////////////////////////////////////////////////////////////////////////////
73 // NativeComboboxViews, View overrides: 73 // NativeComboboxViews, View overrides:
74 74
75 bool NativeComboboxViews::OnMousePressed(const views::MouseEvent& mouse_event) { 75 bool NativeComboboxViews::OnMousePressed(const ui::MouseEvent& mouse_event) {
76 combobox_->RequestFocus(); 76 combobox_->RequestFocus();
77 if (mouse_event.IsLeftMouseButton()) { 77 if (mouse_event.IsLeftMouseButton()) {
78 UpdateFromModel(); 78 UpdateFromModel();
79 ShowDropDownMenu(); 79 ShowDropDownMenu();
80 } 80 }
81 81
82 return true; 82 return true;
83 } 83 }
84 84
85 bool NativeComboboxViews::OnMouseDragged(const views::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 views::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 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/native_combobox_views.h ('k') | ui/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698