OLD | NEW |
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 "views/controls/textfield/native_textfield_views.h" | 5 #include "views/controls/textfield/native_textfield_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "gfx/canvas.h" | |
14 #include "gfx/canvas_skia.h" | |
15 #include "gfx/insets.h" | |
16 #include "grit/app_strings.h" | 13 #include "grit/app_strings.h" |
17 #include "ui/base/clipboard/clipboard.h" | 14 #include "ui/base/clipboard/clipboard.h" |
| 15 #include "ui/gfx/canvas.h" |
| 16 #include "ui/gfx/canvas_skia.h" |
| 17 #include "ui/gfx/insets.h" |
18 #include "views/background.h" | 18 #include "views/background.h" |
19 #include "views/border.h" | 19 #include "views/border.h" |
20 #include "views/controls/menu/menu_2.h" | 20 #include "views/controls/menu/menu_2.h" |
21 #include "views/controls/textfield/textfield.h" | 21 #include "views/controls/textfield/textfield.h" |
22 #include "views/controls/textfield/textfield_views_model.h" | 22 #include "views/controls/textfield/textfield_views_model.h" |
23 #include "views/event.h" | 23 #include "views/event.h" |
24 #include "views/views_delegate.h" | 24 #include "views/views_delegate.h" |
25 | 25 |
26 #if defined(OS_LINUX) | 26 #if defined(OS_LINUX) |
27 #include "gfx/gtk_util.h" | 27 #include "ui/gfx/gtk_util.h" |
28 #endif | 28 #endif |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 // A global flag to switch the Textfield wrapper to TextfieldViews. | 32 // A global flag to switch the Textfield wrapper to TextfieldViews. |
33 bool textfield_view_enabled = false; | 33 bool textfield_view_enabled = false; |
34 | 34 |
35 // Color setttings for text, border, backgrounds and cursor. | 35 // Color setttings for text, border, backgrounds and cursor. |
36 // These are tentative, and should be derived from theme, system | 36 // These are tentative, and should be derived from theme, system |
37 // settings and current settings. | 37 // settings and current settings. |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 } | 913 } |
914 | 914 |
915 void NativeTextfieldViews::TextfieldBorder::SetInsets(int top, | 915 void NativeTextfieldViews::TextfieldBorder::SetInsets(int top, |
916 int left, | 916 int left, |
917 int bottom, | 917 int bottom, |
918 int right) { | 918 int right) { |
919 insets_.Set(top, left, bottom, right); | 919 insets_.Set(top, left, bottom, right); |
920 } | 920 } |
921 | 921 |
922 } // namespace views | 922 } // namespace views |
OLD | NEW |