| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // covered up by other windows), and as a result the view's renderer may be | 115 // covered up by other windows), and as a result the view's renderer may be |
| 116 // suspended. If Show() is called on a view then its state should be re-set to | 116 // suspended. If Show() is called on a view then its state should be re-set to |
| 117 // being un-occluded (an explicit WasUnOccluded call will not be made for | 117 // being un-occluded (an explicit WasUnOccluded call will not be made for |
| 118 // that). These calls are not necessarily made in pairs. | 118 // that). These calls are not necessarily made in pairs. |
| 119 virtual void WasUnOccluded() = 0; | 119 virtual void WasUnOccluded() = 0; |
| 120 virtual void WasOccluded() = 0; | 120 virtual void WasOccluded() = 0; |
| 121 | 121 |
| 122 // Retrieve the bounds of the View, in screen coordinates. | 122 // Retrieve the bounds of the View, in screen coordinates. |
| 123 virtual gfx::Rect GetViewBounds() const = 0; | 123 virtual gfx::Rect GetViewBounds() const = 0; |
| 124 | 124 |
| 125 // Returns true if the View's context menu is showing. | |
| 126 virtual bool IsShowingContextMenu() const = 0; | |
| 127 | |
| 128 // Tells the View whether the context menu is showing. | |
| 129 virtual void SetShowingContextMenu(bool showing) = 0; | |
| 130 | |
| 131 // Returns the currently selected text. | 125 // Returns the currently selected text. |
| 132 virtual base::string16 GetSelectedText() = 0; | 126 virtual base::string16 GetSelectedText() = 0; |
| 133 | 127 |
| 134 // Subclasses should override this method to set the background color. |color| | 128 // Subclasses should override this method to set the background color. |color| |
| 135 // has to be either SK_ColorTRANSPARENT or opaque. If set to | 129 // has to be either SK_ColorTRANSPARENT or opaque. If set to |
| 136 // SK_ColorTRANSPARENT, the renderer's background color will be overridden to | 130 // SK_ColorTRANSPARENT, the renderer's background color will be overridden to |
| 137 // be fully transparent. | 131 // be fully transparent. |
| 138 virtual void SetBackgroundColor(SkColor color) = 0; | 132 virtual void SetBackgroundColor(SkColor color) = 0; |
| 139 virtual SkColor background_color() const = 0; | 133 virtual SkColor background_color() const = 0; |
| 140 // Convenience method to fill the background layer with the default color by | 134 // Convenience method to fill the background layer with the default color by |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // Returns |true| if text is currently being spoken by Mac OS X. | 246 // Returns |true| if text is currently being spoken by Mac OS X. |
| 253 virtual bool IsSpeaking() const = 0; | 247 virtual bool IsSpeaking() const = 0; |
| 254 // Stops speaking, if it is currently in progress. | 248 // Stops speaking, if it is currently in progress. |
| 255 virtual void StopSpeaking() = 0; | 249 virtual void StopSpeaking() = 0; |
| 256 #endif // defined(OS_MACOSX) | 250 #endif // defined(OS_MACOSX) |
| 257 }; | 251 }; |
| 258 | 252 |
| 259 } // namespace content | 253 } // namespace content |
| 260 | 254 |
| 261 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 255 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |