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 "ui/views/touchui/touch_selection_controller_impl.h" | 5 #include "ui/views/touchui/touch_selection_controller_impl.h" |
6 | 6 |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "grit/ui_strings.h" | 9 #include "grit/ui_strings.h" |
10 #include "third_party/skia/include/effects/SkGradientShader.h" | 10 #include "third_party/skia/include/effects/SkGradientShader.h" |
11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
13 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
14 #include "ui/gfx/canvas_skia.h" | 14 #include "ui/gfx/canvas_skia.h" |
15 #include "ui/gfx/path.h" | 15 #include "ui/gfx/path.h" |
16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
17 #include "ui/gfx/screen.h" | 17 #include "ui/gfx/screen.h" |
18 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
19 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
| 20 #include "ui/views/background.h" |
20 #include "ui/views/controls/button/button.h" | 21 #include "ui/views/controls/button/button.h" |
21 #include "ui/views/controls/button/custom_button.h" | 22 #include "ui/views/controls/button/custom_button.h" |
22 #include "ui/views/controls/button/text_button.h" | 23 #include "ui/views/controls/button/text_button.h" |
23 #include "ui/views/controls/label.h" | 24 #include "ui/views/controls/label.h" |
24 #include "ui/views/controls/menu/menu_config.h" | 25 #include "ui/views/controls/menu/menu_config.h" |
25 #include "ui/views/layout/box_layout.h" | 26 #include "ui/views/layout/box_layout.h" |
26 #include "ui/views/widget/widget.h" | 27 #include "ui/views/widget/widget.h" |
27 #include "views/background.h" | |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // Constants defining the visual attributes of selection handles | 31 // Constants defining the visual attributes of selection handles |
32 const int kSelectionHandleRadius = 10; | 32 const int kSelectionHandleRadius = 10; |
33 const int kSelectionHandleCursorHeight = 10; | 33 const int kSelectionHandleCursorHeight = 10; |
34 const int kSelectionHandleAlpha = 0x7F; | 34 const int kSelectionHandleAlpha = 0x7F; |
35 const SkColor kSelectionHandleColor = | 35 const SkColor kSelectionHandleColor = |
36 SkColorSetA(SK_ColorBLUE, kSelectionHandleAlpha); | 36 SkColorSetA(SK_ColorBLUE, kSelectionHandleAlpha); |
37 | 37 |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { | 499 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { |
500 return selection_handle_2_->IsVisible(); | 500 return selection_handle_2_->IsVisible(); |
501 } | 501 } |
502 | 502 |
503 TouchSelectionController* TouchSelectionController::create( | 503 TouchSelectionController* TouchSelectionController::create( |
504 TouchSelectionClientView* client_view) { | 504 TouchSelectionClientView* client_view) { |
505 return new TouchSelectionControllerImpl(client_view); | 505 return new TouchSelectionControllerImpl(client_view); |
506 } | 506 } |
507 | 507 |
508 } // namespace views | 508 } // namespace views |
OLD | NEW |