| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 // Retrieve the bounds of the View, in screen coordinates. | 117 // Retrieve the bounds of the View, in screen coordinates. |
| 118 virtual gfx::Rect GetViewBounds() const = 0; | 118 virtual gfx::Rect GetViewBounds() const = 0; |
| 119 | 119 |
| 120 // Returns true if the View's context menu is showing. | 120 // Returns true if the View's context menu is showing. |
| 121 virtual bool IsShowingContextMenu() const = 0; | 121 virtual bool IsShowingContextMenu() const = 0; |
| 122 | 122 |
| 123 // Tells the View whether the context menu is showing. | 123 // Tells the View whether the context menu is showing. |
| 124 virtual void SetShowingContextMenu(bool showing) = 0; | 124 virtual void SetShowingContextMenu(bool showing) = 0; |
| 125 | 125 |
| 126 // Returns the currently selected text. | |
| 127 virtual base::string16 GetSelectedText() const = 0; | |
| 128 | |
| 129 // Subclasses should override this method to set the background color. |color| | 126 // Subclasses should override this method to set the background color. |color| |
| 130 // could be transparent or opaque. | 127 // could be transparent or opaque. |
| 131 virtual void SetBackgroundColor(SkColor color) = 0; | 128 virtual void SetBackgroundColor(SkColor color) = 0; |
| 132 // Convenience method to fill the background layer with the default color by | 129 // Convenience method to fill the background layer with the default color by |
| 133 // calling |SetBackgroundColor|. | 130 // calling |SetBackgroundColor|. |
| 134 virtual void SetBackgroundColorToDefault() = 0; | 131 virtual void SetBackgroundColorToDefault() = 0; |
| 135 virtual bool GetBackgroundOpaque() = 0; | 132 virtual bool GetBackgroundOpaque() = 0; |
| 136 | 133 |
| 137 // Return value indicates whether the mouse is locked successfully or not. | 134 // Return value indicates whether the mouse is locked successfully or not. |
| 138 virtual bool LockMouse() = 0; | 135 virtual bool LockMouse() = 0; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Returns |true| if text is currently being spoken by Mac OS X. | 182 // Returns |true| if text is currently being spoken by Mac OS X. |
| 186 virtual bool IsSpeaking() const = 0; | 183 virtual bool IsSpeaking() const = 0; |
| 187 // Stops speaking, if it is currently in progress. | 184 // Stops speaking, if it is currently in progress. |
| 188 virtual void StopSpeaking() = 0; | 185 virtual void StopSpeaking() = 0; |
| 189 #endif // defined(OS_MACOSX) | 186 #endif // defined(OS_MACOSX) |
| 190 }; | 187 }; |
| 191 | 188 |
| 192 } // namespace content | 189 } // namespace content |
| 193 | 190 |
| 194 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 191 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |