| 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 20 matching lines...) Expand all Loading... |
| 31 // ^p1 ^p2 | 31 // ^p1 ^p2 |
| 32 // | 32 // |
| 33 // p1 should be the logical start and p2 the logical end of selection. Hence, | 33 // p1 should be the logical start and p2 the logical end of selection. Hence, |
| 34 // visually, p1 could be to the right of p2 in the figure above. | 34 // visually, p1 could be to the right of p2 in the figure above. |
| 35 virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) = 0; | 35 virtual void GetSelectionEndPoints(gfx::Rect* p1, gfx::Rect* p2) = 0; |
| 36 | 36 |
| 37 // Gets the bounds of the client view in parent's coordinates. | 37 // Gets the bounds of the client view in parent's coordinates. |
| 38 virtual gfx::Rect GetBounds() = 0; | 38 virtual gfx::Rect GetBounds() = 0; |
| 39 | 39 |
| 40 // Gets the NativeView hosting the client. | 40 // Gets the NativeView hosting the client. |
| 41 virtual gfx::NativeView GetNativeView() const = 0; | 41 virtual gfx::NativeView GetNativeView() = 0; |
| 42 | 42 |
| 43 // Converts a point to/from screen coordinates from/to client view. | 43 // Converts a point to/from screen coordinates from/to client view. |
| 44 virtual void ConvertPointToScreen(gfx::Point* point) = 0; | 44 virtual void ConvertPointToScreen(gfx::Point* point) = 0; |
| 45 virtual void ConvertPointFromScreen(gfx::Point* point) = 0; | 45 virtual void ConvertPointFromScreen(gfx::Point* point) = 0; |
| 46 | 46 |
| 47 // Returns true if the editable draws its own handles (hence, the | 47 // Returns true if the editable draws its own handles (hence, the |
| 48 // TouchSelectionController need not draw handles). | 48 // TouchSelectionController need not draw handles). |
| 49 virtual bool DrawsHandles() = 0; | 49 virtual bool DrawsHandles() = 0; |
| 50 | 50 |
| 51 // Tells the editable to open context menu. | 51 // Tells the editable to open context menu. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 virtual TouchSelectionController* create(TouchEditable* client_view) = 0; | 79 virtual TouchSelectionController* create(TouchEditable* client_view) = 0; |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 virtual ~TouchSelectionControllerFactory() {} | 82 virtual ~TouchSelectionControllerFactory() {} |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace views | 85 } // namespace views |
| 86 | 86 |
| 87 #endif // UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ | 87 #endif // UI_BASE_TOUCH_TOUCH_EDITING_CONTROLLER_H_ |
| OLD | NEW |