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

Side by Side Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 10827271: Replace views::Event with ui::Event. (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/textfield/native_textfield_views.h ('k') | ui/views/events/event.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/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 NativeTextfieldViews::NativeTextfieldViews(Textfield* parent) 68 NativeTextfieldViews::NativeTextfieldViews(Textfield* parent)
69 : textfield_(parent), 69 : textfield_(parent),
70 ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TextfieldViewsModel(this))), 70 ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TextfieldViewsModel(this))),
71 text_border_(new FocusableBorder()), 71 text_border_(new FocusableBorder()),
72 is_cursor_visible_(false), 72 is_cursor_visible_(false),
73 is_drop_cursor_visible_(false), 73 is_drop_cursor_visible_(false),
74 skip_input_method_cancel_composition_(false), 74 skip_input_method_cancel_composition_(false),
75 initiating_drag_(false), 75 initiating_drag_(false),
76 ALLOW_THIS_IN_INITIALIZER_LIST(cursor_timer_(this)), 76 ALLOW_THIS_IN_INITIALIZER_LIST(cursor_timer_(this)),
77 aggregated_clicks_(0), 77 aggregated_clicks_(0),
78 last_click_time_(),
79 last_click_location_(),
80 ALLOW_THIS_IN_INITIALIZER_LIST(touch_selection_controller_( 78 ALLOW_THIS_IN_INITIALIZER_LIST(touch_selection_controller_(
81 TouchSelectionController::create(this))) { 79 TouchSelectionController::create(this))) {
82 set_border(text_border_); 80 set_border(text_border_);
83 81
84 #if defined(OS_CHROMEOS) 82 #if defined(OS_CHROMEOS)
85 GetRenderText()->SetFontList(gfx::FontList(l10n_util::GetStringUTF8( 83 GetRenderText()->SetFontList(gfx::FontList(l10n_util::GetStringUTF8(
86 IDS_UI_FONT_FAMILY_CROS))); 84 IDS_UI_FONT_FAMILY_CROS)));
87 #else 85 #else
88 GetRenderText()->SetFontList(gfx::FontList(textfield_->font())); 86 GetRenderText()->SetFontList(gfx::FontList(textfield_->font()));
89 #endif 87 #endif
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 // Filter out all control characters, including tab and new line characters, 1220 // Filter out all control characters, including tab and new line characters,
1223 // and all characters with Alt modifier. But we need to allow characters with 1221 // and all characters with Alt modifier. But we need to allow characters with
1224 // AltGr modifier. 1222 // AltGr modifier.
1225 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different 1223 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different
1226 // flag that we don't care about. 1224 // flag that we don't care about.
1227 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && 1225 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) &&
1228 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; 1226 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN;
1229 } 1227 }
1230 1228
1231 } // namespace views 1229 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.h ('k') | ui/views/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698