| 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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // Begin subscribing for presentation events and captured frames. | 139 // Begin subscribing for presentation events and captured frames. |
| 140 // |subscriber| is now owned by this object, it will be called only on the | 140 // |subscriber| is now owned by this object, it will be called only on the |
| 141 // UI thread. | 141 // UI thread. |
| 142 virtual void BeginFrameSubscription( | 142 virtual void BeginFrameSubscription( |
| 143 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) = 0; | 143 scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) = 0; |
| 144 | 144 |
| 145 // End subscribing for frame presentation events. FrameSubscriber will be | 145 // End subscribing for frame presentation events. FrameSubscriber will be |
| 146 // deleted after this call. | 146 // deleted after this call. |
| 147 virtual void EndFrameSubscription() = 0; | 147 virtual void EndFrameSubscription() = 0; |
| 148 | 148 |
| 149 // Notifies the view that its enclosing window has changed visibility |
| 150 // (minimized/unminimized, app hidden/unhidden, etc). |
| 151 virtual void SetWindowVisibility(bool visible) = 0; |
| 152 |
| 149 #if defined(OS_MACOSX) | 153 #if defined(OS_MACOSX) |
| 150 // Set the view's active state (i.e., tint state of controls). | 154 // Set the view's active state (i.e., tint state of controls). |
| 151 virtual void SetActive(bool active) = 0; | 155 virtual void SetActive(bool active) = 0; |
| 152 | 156 |
| 153 // Notifies the view that its enclosing window has changed visibility | |
| 154 // (minimized/unminimized, app hidden/unhidden, etc). | |
| 155 // TODO(stuartmorgan): This is a temporary plugin-specific workaround for | |
| 156 // <http://crbug.com/34266>. Once that is fixed, this (and the corresponding | |
| 157 // message and renderer-side handling) can be removed in favor of using | |
| 158 // WasHidden/WasShown. | |
| 159 virtual void SetWindowVisibility(bool visible) = 0; | |
| 160 | 157 |
| 161 // Informs the view that its containing window's frame changed. | 158 // Informs the view that its containing window's frame changed. |
| 162 virtual void WindowFrameChanged() = 0; | 159 virtual void WindowFrameChanged() = 0; |
| 163 | 160 |
| 164 // Brings up the dictionary showing a definition for the selected text. | 161 // Brings up the dictionary showing a definition for the selected text. |
| 165 virtual void ShowDefinitionForSelection() = 0; | 162 virtual void ShowDefinitionForSelection() = 0; |
| 166 | 163 |
| 167 // Returns |true| if Mac OS X text to speech is supported. | 164 // Returns |true| if Mac OS X text to speech is supported. |
| 168 virtual bool SupportsSpeech() const = 0; | 165 virtual bool SupportsSpeech() const = 0; |
| 169 // Tells the view to speak the currently selected text. | 166 // Tells the view to speak the currently selected text. |
| 170 virtual void SpeakSelection() = 0; | 167 virtual void SpeakSelection() = 0; |
| 171 // Returns |true| if text is currently being spoken by Mac OS X. | 168 // Returns |true| if text is currently being spoken by Mac OS X. |
| 172 virtual bool IsSpeaking() const = 0; | 169 virtual bool IsSpeaking() const = 0; |
| 173 // Stops speaking, if it is currently in progress. | 170 // Stops speaking, if it is currently in progress. |
| 174 virtual void StopSpeaking() = 0; | 171 virtual void StopSpeaking() = 0; |
| 175 #endif // defined(OS_MACOSX) | 172 #endif // defined(OS_MACOSX) |
| 176 }; | 173 }; |
| 177 | 174 |
| 178 } // namespace content | 175 } // namespace content |
| 179 | 176 |
| 180 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 177 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |