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

Side by Side Diff: chrome/browser/chromeos/login/textfield_with_margin.cc

Issue 10917075: events: Move some files into ui/base/events/ (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
OLDNEW
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 #include "chrome/browser/chromeos/login/textfield_with_margin.h" 5 #include "chrome/browser/chromeos/login/textfield_with_margin.h"
6 6
7 #include "chrome/browser/chromeos/login/helper.h" 7 #include "chrome/browser/chromeos/login/helper.h"
8 #include "ui/base/event.h" 8 #include "ui/base/events/event.h"
9 #include "ui/base/keycodes/keyboard_codes.h" 9 #include "ui/base/keycodes/keyboard_codes.h"
10 10
11 namespace { 11 namespace {
12 12
13 // Holds ratio of the margin to the preferred text height. 13 // Holds ratio of the margin to the preferred text height.
14 const double kTextMarginRate = 0.33; 14 const double kTextMarginRate = 0.33;
15 15
16 // Size of each vertical margin (top, bottom). 16 // Size of each vertical margin (top, bottom).
17 const int kVerticalMargin = 3; 17 const int kVerticalMargin = 3;
18 18
(...skipping 19 matching lines...) Expand all
38 38
39 bool TextfieldWithMargin::OnKeyPressed(const ui::KeyEvent& e) { 39 bool TextfieldWithMargin::OnKeyPressed(const ui::KeyEvent& e) {
40 if (e.key_code() == ui::VKEY_ESCAPE && !text().empty()) { 40 if (e.key_code() == ui::VKEY_ESCAPE && !text().empty()) {
41 SetText(string16()); 41 SetText(string16());
42 return true; 42 return true;
43 } 43 }
44 return views::Textfield::OnKeyPressed(e); 44 return views::Textfield::OnKeyPressed(e);
45 } 45 }
46 46
47 } // namespace chromeos 47 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/password_changed_view.cc ('k') | chrome/browser/chromeos/options/vpn_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698