OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/time.h" | 7 #include "base/time/time.h" |
8 #include "grit/ui_resources.h" | 8 #include "grit/ui_resources.h" |
9 #include "grit/ui_strings.h" | 9 #include "grit/ui_strings.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| 11 #include "ui/base/ui_base_switches_util.h" |
11 #include "ui/gfx/canvas.h" | 12 #include "ui/gfx/canvas.h" |
12 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
13 #include "ui/gfx/path.h" | 14 #include "ui/gfx/path.h" |
14 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
15 #include "ui/gfx/screen.h" | 16 #include "ui/gfx/screen.h" |
16 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
17 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
18 #include "ui/wm/core/masked_window_targeter.h" | 19 #include "ui/wm/core/masked_window_targeter.h" |
19 #include "ui/wm/core/shadow_types.h" | 20 #include "ui/wm/core/shadow_types.h" |
20 #include "ui/wm/core/window_animations.h" | 21 #include "ui/wm/core/window_animations.h" |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 } | 602 } |
602 | 603 |
603 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { | 604 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { |
604 return selection_handle_2_->IsWidgetVisible(); | 605 return selection_handle_2_->IsWidgetVisible(); |
605 } | 606 } |
606 | 607 |
607 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { | 608 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { |
608 return cursor_handle_->IsWidgetVisible(); | 609 return cursor_handle_->IsWidgetVisible(); |
609 } | 610 } |
610 | 611 |
| 612 ViewsTouchSelectionControllerFactory::ViewsTouchSelectionControllerFactory() { |
| 613 } |
| 614 |
| 615 ui::TouchSelectionController* ViewsTouchSelectionControllerFactory::create( |
| 616 ui::TouchEditable* client_view) { |
| 617 if (switches::IsTouchEditingEnabled()) |
| 618 return new views::TouchSelectionControllerImpl(client_view); |
| 619 return NULL; |
| 620 } |
| 621 |
611 } // namespace views | 622 } // namespace views |
OLD | NEW |