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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Returns true if the View's context menu is showing. | 125 // Returns true if the View's context menu is showing. |
126 virtual bool IsShowingContextMenu() const = 0; | 126 virtual bool IsShowingContextMenu() const = 0; |
127 | 127 |
128 // Tells the View whether the context menu is showing. | 128 // Tells the View whether the context menu is showing. |
129 virtual void SetShowingContextMenu(bool showing) = 0; | 129 virtual void SetShowingContextMenu(bool showing) = 0; |
130 | 130 |
131 // Returns the currently selected text. | 131 // Returns the currently selected text. |
132 virtual base::string16 GetSelectedText() = 0; | 132 virtual base::string16 GetSelectedText() = 0; |
133 | 133 |
134 // Subclasses should override this method to set the background color. |color| | 134 // Subclasses should override this method to set the background color. |color| |
135 // could be transparent or opaque. | 135 // has to be either SK_ColorTRANSPARENT or opaque. If set to |
| 136 // SK_ColorTRANSPARENT, the renderer's background color will be overridden to |
| 137 // be fully transparent. |
136 virtual void SetBackgroundColor(SkColor color) = 0; | 138 virtual void SetBackgroundColor(SkColor color) = 0; |
| 139 virtual SkColor background_color() const = 0; |
137 // Convenience method to fill the background layer with the default color by | 140 // Convenience method to fill the background layer with the default color by |
138 // calling |SetBackgroundColor|. | 141 // calling |SetBackgroundColor|. |
139 virtual SkColor background_color() = 0; | |
140 virtual void SetBackgroundColorToDefault() = 0; | 142 virtual void SetBackgroundColorToDefault() = 0; |
141 virtual bool GetBackgroundOpaque() = 0; | |
142 | 143 |
143 // Return value indicates whether the mouse is locked successfully or not. | 144 // Return value indicates whether the mouse is locked successfully or not. |
144 virtual bool LockMouse() = 0; | 145 virtual bool LockMouse() = 0; |
145 virtual void UnlockMouse() = 0; | 146 virtual void UnlockMouse() = 0; |
146 // Returns true if the mouse pointer is currently locked. | 147 // Returns true if the mouse pointer is currently locked. |
147 virtual bool IsMouseLocked() = 0; | 148 virtual bool IsMouseLocked() = 0; |
148 | 149 |
149 // Retrives the size of the viewport for the visible region. May be smaller | 150 // Retrives the size of the viewport for the visible region. May be smaller |
150 // than the view size if a portion of the view is obstructed (e.g. by a | 151 // than the view size if a portion of the view is obstructed (e.g. by a |
151 // virtual keyboard). | 152 // virtual keyboard). |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 // Returns |true| if text is currently being spoken by Mac OS X. | 252 // Returns |true| if text is currently being spoken by Mac OS X. |
252 virtual bool IsSpeaking() const = 0; | 253 virtual bool IsSpeaking() const = 0; |
253 // Stops speaking, if it is currently in progress. | 254 // Stops speaking, if it is currently in progress. |
254 virtual void StopSpeaking() = 0; | 255 virtual void StopSpeaking() = 0; |
255 #endif // defined(OS_MACOSX) | 256 #endif // defined(OS_MACOSX) |
256 }; | 257 }; |
257 | 258 |
258 } // namespace content | 259 } // namespace content |
259 | 260 |
260 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 261 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |