| 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 #ifndef UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ | 5 #ifndef UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ |
| 6 #define UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ | 6 #define UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "ui/base/models/simple_menu_model.h" | 8 #include "ui/base/models/simple_menu_model.h" |
| 9 #include "ui/gfx/point.h" | 9 #include "ui/gfx/point.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Creates a TouchSelectionController. Caller owns the returned object. | 68 // Creates a TouchSelectionController. Caller owns the returned object. |
| 69 static TouchSelectionController* create( | 69 static TouchSelectionController* create( |
| 70 TouchEditable* client_view); | 70 TouchEditable* client_view); |
| 71 | 71 |
| 72 // Notifies the controller that the selection has changed. | 72 // Notifies the controller that the selection has changed. |
| 73 virtual void SelectionChanged() = 0; | 73 virtual void SelectionChanged() = 0; |
| 74 | 74 |
| 75 // Returns true if the user is currently dragging one of the handles. | 75 // Returns true if the user is currently dragging one of the handles. |
| 76 virtual bool IsHandleDragInProgress() = 0; | 76 virtual bool IsHandleDragInProgress() = 0; |
| 77 |
| 78 // Hides visible handles. According to the value of |quick|, handles might |
| 79 // fade out quickly or slowly. |
| 80 virtual void HideHandles(bool quick) = 0; |
| 77 }; | 81 }; |
| 78 | 82 |
| 79 class UI_BASE_EXPORT TouchSelectionControllerFactory { | 83 class UI_BASE_EXPORT TouchSelectionControllerFactory { |
| 80 public: | 84 public: |
| 81 static void SetInstance(TouchSelectionControllerFactory* instance); | 85 static void SetInstance(TouchSelectionControllerFactory* instance); |
| 82 | 86 |
| 83 virtual TouchSelectionController* create(TouchEditable* client_view) = 0; | 87 virtual TouchSelectionController* create(TouchEditable* client_view) = 0; |
| 84 | 88 |
| 85 protected: | 89 protected: |
| 86 virtual ~TouchSelectionControllerFactory() {} | 90 virtual ~TouchSelectionControllerFactory() {} |
| 87 }; | 91 }; |
| 88 | 92 |
| 89 } // namespace views | 93 } // namespace views |
| 90 | 94 |
| 91 #endif // UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ | 95 #endif // UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ |
| OLD | NEW |