OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 // Retrieve the bounds of the View, in screen coordinates. | 98 // Retrieve the bounds of the View, in screen coordinates. |
99 virtual gfx::Rect GetViewBounds() const = 0; | 99 virtual gfx::Rect GetViewBounds() const = 0; |
100 | 100 |
101 // Returns true if the View's context menu is showing. | 101 // Returns true if the View's context menu is showing. |
102 virtual bool IsShowingContextMenu() const = 0; | 102 virtual bool IsShowingContextMenu() const = 0; |
103 | 103 |
104 // Tells the View whether the context menu is showing. | 104 // Tells the View whether the context menu is showing. |
105 virtual void SetShowingContextMenu(bool showing) = 0; | 105 virtual void SetShowingContextMenu(bool showing) = 0; |
106 | 106 |
| 107 // Returns the currently selected text. |
| 108 virtual string16 GetSelectedText() const = 0; |
| 109 |
107 #if defined(OS_MACOSX) | 110 #if defined(OS_MACOSX) |
108 // Set the view's active state (i.e., tint state of controls). | 111 // Set the view's active state (i.e., tint state of controls). |
109 virtual void SetActive(bool active) = 0; | 112 virtual void SetActive(bool active) = 0; |
110 | 113 |
111 // Tells the view whether or not to accept first responder status. If |flag| | 114 // Tells the view whether or not to accept first responder status. If |flag| |
112 // is true, the view does not accept first responder status and instead | 115 // is true, the view does not accept first responder status and instead |
113 // manually becomes first responder when it receives a mouse down event. If | 116 // manually becomes first responder when it receives a mouse down event. If |
114 // |flag| is false, the view participates in the key-view chain as normal. | 117 // |flag| is false, the view participates in the key-view chain as normal. |
115 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; | 118 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; |
116 | 119 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // Return value indicates whether the mouse is locked successfully or not. | 166 // Return value indicates whether the mouse is locked successfully or not. |
164 virtual bool LockMouse() = 0; | 167 virtual bool LockMouse() = 0; |
165 virtual void UnlockMouse() = 0; | 168 virtual void UnlockMouse() = 0; |
166 // Returns true if the mouse pointer is currently locked. | 169 // Returns true if the mouse pointer is currently locked. |
167 virtual bool IsMouseLocked() = 0; | 170 virtual bool IsMouseLocked() = 0; |
168 }; | 171 }; |
169 | 172 |
170 } // namespace content | 173 } // namespace content |
171 | 174 |
172 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 175 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |