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 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
11 #if defined(OS_LINUX) | 11 #if defined(OS_LINUX) |
12 #include <gdk/gdk.h> | 12 #include <gdk/gdk.h> |
13 #endif | 13 #endif |
14 | 14 |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "app/keyboard_codes.h" | |
18 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
| 18 #include "base/keyboard_codes.h" |
19 #if !defined(OS_LINUX) | 19 #if !defined(OS_LINUX) |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #endif | 21 #endif |
22 #include "base/string16.h" | 22 #include "base/string16.h" |
23 #include "gfx/font.h" | 23 #include "gfx/font.h" |
24 #include "views/view.h" | 24 #include "views/view.h" |
25 #include "third_party/skia/include/core/SkColor.h" | 25 #include "third_party/skia/include/core/SkColor.h" |
26 | 26 |
27 #ifdef UNIT_TEST | 27 #ifdef UNIT_TEST |
28 #include "gfx/native_widget_types.h" | 28 #include "gfx/native_widget_types.h" |
(...skipping 29 matching lines...) Expand all Loading... |
58 unsigned int message() const { return message_; } | 58 unsigned int message() const { return message_; } |
59 wchar_t key() const { return key_; } | 59 wchar_t key() const { return key_; } |
60 int repeat_count() const { return repeat_count_; } | 60 int repeat_count() const { return repeat_count_; } |
61 unsigned int flags() const { return flags_; } | 61 unsigned int flags() const { return flags_; } |
62 #else | 62 #else |
63 explicit Keystroke(GdkEventKey* event) | 63 explicit Keystroke(GdkEventKey* event) |
64 : event_(*event) { | 64 : event_(*event) { |
65 } | 65 } |
66 const GdkEventKey* event() const { return &event_; } | 66 const GdkEventKey* event() const { return &event_; } |
67 #endif | 67 #endif |
68 app::KeyboardCode GetKeyboardCode() const; | 68 base::KeyboardCode GetKeyboardCode() const; |
69 bool IsControlHeld() const; | 69 bool IsControlHeld() const; |
70 bool IsShiftHeld() const; | 70 bool IsShiftHeld() const; |
71 | 71 |
72 private: | 72 private: |
73 #if defined(OS_WIN) | 73 #if defined(OS_WIN) |
74 unsigned int message_; | 74 unsigned int message_; |
75 wchar_t key_; | 75 wchar_t key_; |
76 int repeat_count_; | 76 int repeat_count_; |
77 unsigned int flags_; | 77 unsigned int flags_; |
78 #else | 78 #else |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 // Text to display when empty. | 293 // Text to display when empty. |
294 string16 text_to_display_when_empty_; | 294 string16 text_to_display_when_empty_; |
295 | 295 |
296 DISALLOW_COPY_AND_ASSIGN(Textfield); | 296 DISALLOW_COPY_AND_ASSIGN(Textfield); |
297 }; | 297 }; |
298 | 298 |
299 } // namespace views | 299 } // namespace views |
300 | 300 |
301 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 301 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |