OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined (OS_LINUX) | 9 #if defined (OS_LINUX) |
10 #include <gdk/gdk.h> | 10 #include <gdk/gdk.h> |
11 #endif | 11 #endif |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
| 15 #include "app/keyboard_codes.h" |
15 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
16 #include "base/keyboard_codes.h" | |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/string16.h" | 18 #include "base/string16.h" |
19 #include "gfx/font.h" | 19 #include "gfx/font.h" |
20 #include "views/view.h" | 20 #include "views/view.h" |
21 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
22 | 22 |
23 #ifdef UNIT_TEST | 23 #ifdef UNIT_TEST |
24 #include "gfx/native_widget_types.h" | 24 #include "gfx/native_widget_types.h" |
25 #include "views/controls/textfield/native_textfield_wrapper.h" | 25 #include "views/controls/textfield/native_textfield_wrapper.h" |
26 #endif | 26 #endif |
(...skipping 27 matching lines...) Expand all Loading... |
54 unsigned int message() const { return message_; } | 54 unsigned int message() const { return message_; } |
55 wchar_t key() const { return key_; } | 55 wchar_t key() const { return key_; } |
56 int repeat_count() const { return repeat_count_; } | 56 int repeat_count() const { return repeat_count_; } |
57 unsigned int flags() const { return flags_; } | 57 unsigned int flags() const { return flags_; } |
58 #else | 58 #else |
59 explicit Keystroke(GdkEventKey* event) | 59 explicit Keystroke(GdkEventKey* event) |
60 : event_(*event) { | 60 : event_(*event) { |
61 } | 61 } |
62 const GdkEventKey* event() const { return &event_; } | 62 const GdkEventKey* event() const { return &event_; } |
63 #endif | 63 #endif |
64 base::KeyboardCode GetKeyboardCode() const; | 64 app::KeyboardCode GetKeyboardCode() const; |
65 bool IsControlHeld() const; | 65 bool IsControlHeld() const; |
66 bool IsShiftHeld() const; | 66 bool IsShiftHeld() const; |
67 | 67 |
68 private: | 68 private: |
69 #if defined(OS_WIN) | 69 #if defined(OS_WIN) |
70 unsigned int message_; | 70 unsigned int message_; |
71 wchar_t key_; | 71 wchar_t key_; |
72 int repeat_count_; | 72 int repeat_count_; |
73 unsigned int flags_; | 73 unsigned int flags_; |
74 #else | 74 #else |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 // Text to display when empty. | 289 // Text to display when empty. |
290 string16 text_to_display_when_empty_; | 290 string16 text_to_display_when_empty_; |
291 | 291 |
292 DISALLOW_COPY_AND_ASSIGN(Textfield); | 292 DISALLOW_COPY_AND_ASSIGN(Textfield); |
293 }; | 293 }; |
294 | 294 |
295 } // namespace views | 295 } // namespace views |
296 | 296 |
297 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 297 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |