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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 // Returns true if the View's context menu is showing. | 121 // Returns true if the View's context menu is showing. |
122 virtual bool IsShowingContextMenu() const = 0; | 122 virtual bool IsShowingContextMenu() const = 0; |
123 | 123 |
124 // Tells the View whether the context menu is showing. | 124 // Tells the View whether the context menu is showing. |
125 virtual void SetShowingContextMenu(bool showing) = 0; | 125 virtual void SetShowingContextMenu(bool showing) = 0; |
126 | 126 |
127 // Returns the currently selected text. | 127 // Returns the currently selected text. |
128 virtual base::string16 GetSelectedText() = 0; | 128 virtual base::string16 GetSelectedText() = 0; |
129 | 129 |
130 // Subclasses should override this method to set the background color. |color| | 130 // Subclasses should override this method to set the background color. |color| |
131 // could be transparent or opaque. | 131 // has to be either SK_ColorTRANSPARENT or opaque. If set to |
132 // SK_ColorTRANSPARENT, the renderer's background color will be overridden to | |
133 // be fully transparent. | |
132 virtual void SetBackgroundColor(SkColor color) = 0; | 134 virtual void SetBackgroundColor(SkColor color) = 0; |
135 virtual SkColor background_color() const = 0; | |
danakj
2017/02/28 17:52:31
Technically this breaks (already did) the style gu
Eric Seckler
2017/03/01 10:22:09
Yeah, I was considering doing that, but it seemed
| |
133 // Convenience method to fill the background layer with the default color by | 136 // Convenience method to fill the background layer with the default color by |
134 // calling |SetBackgroundColor|. | 137 // calling |SetBackgroundColor|. |
135 virtual SkColor background_color() = 0; | |
136 virtual void SetBackgroundColorToDefault() = 0; | 138 virtual void SetBackgroundColorToDefault() = 0; |
137 virtual bool GetBackgroundOpaque() = 0; | |
138 | 139 |
139 // Return value indicates whether the mouse is locked successfully or not. | 140 // Return value indicates whether the mouse is locked successfully or not. |
140 virtual bool LockMouse() = 0; | 141 virtual bool LockMouse() = 0; |
141 virtual void UnlockMouse() = 0; | 142 virtual void UnlockMouse() = 0; |
142 // Returns true if the mouse pointer is currently locked. | 143 // Returns true if the mouse pointer is currently locked. |
143 virtual bool IsMouseLocked() = 0; | 144 virtual bool IsMouseLocked() = 0; |
144 | 145 |
145 // Retrives the size of the viewport for the visible region. May be smaller | 146 // Retrives the size of the viewport for the visible region. May be smaller |
146 // than the view size if a portion of the view is obstructed (e.g. by a | 147 // than the view size if a portion of the view is obstructed (e.g. by a |
147 // virtual keyboard). | 148 // virtual keyboard). |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 // Returns |true| if text is currently being spoken by Mac OS X. | 193 // Returns |true| if text is currently being spoken by Mac OS X. |
193 virtual bool IsSpeaking() const = 0; | 194 virtual bool IsSpeaking() const = 0; |
194 // Stops speaking, if it is currently in progress. | 195 // Stops speaking, if it is currently in progress. |
195 virtual void StopSpeaking() = 0; | 196 virtual void StopSpeaking() = 0; |
196 #endif // defined(OS_MACOSX) | 197 #endif // defined(OS_MACOSX) |
197 }; | 198 }; |
198 | 199 |
199 } // namespace content | 200 } // namespace content |
200 | 201 |
201 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 202 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |