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_VIEW_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Copies the image at location x, y to the clipboard (if there indeed is an | 96 // Copies the image at location x, y to the clipboard (if there indeed is an |
97 // image at that location). | 97 // image at that location). |
98 virtual void CopyImageAt(int x, int y) = 0; | 98 virtual void CopyImageAt(int x, int y) = 0; |
99 | 99 |
100 // Notifies the renderer about the result of a desktop notification. | 100 // Notifies the renderer about the result of a desktop notification. |
101 virtual void DesktopNotificationPermissionRequestDone( | 101 virtual void DesktopNotificationPermissionRequestDone( |
102 int callback_context) = 0; | 102 int callback_context) = 0; |
103 virtual void DesktopNotificationPostDisplay(int callback_context) = 0; | 103 virtual void DesktopNotificationPostDisplay(int callback_context) = 0; |
104 virtual void DesktopNotificationPostError(int notification_id, | 104 virtual void DesktopNotificationPostError(int notification_id, |
105 const string16& message) = 0; | 105 const base::string16& message) = 0; |
106 virtual void DesktopNotificationPostClose(int notification_id, | 106 virtual void DesktopNotificationPostClose(int notification_id, |
107 bool by_user) = 0; | 107 bool by_user) = 0; |
108 virtual void DesktopNotificationPostClick(int notification_id) = 0; | 108 virtual void DesktopNotificationPostClick(int notification_id) = 0; |
109 | 109 |
110 // Notifies the listener that a directory enumeration is complete. | 110 // Notifies the listener that a directory enumeration is complete. |
111 virtual void DirectoryEnumerationFinished( | 111 virtual void DirectoryEnumerationFinished( |
112 int request_id, | 112 int request_id, |
113 const std::vector<base::FilePath>& files) = 0; | 113 const std::vector<base::FilePath>& files) = 0; |
114 | 114 |
115 // Tells the renderer not to add scrollbars with height and width below a | 115 // Tells the renderer not to add scrollbars with height and width below a |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 virtual void ExecuteCustomContextMenuCommand( | 163 virtual void ExecuteCustomContextMenuCommand( |
164 int action, const CustomContextMenuContext& context) = 0; | 164 int action, const CustomContextMenuContext& context) = 0; |
165 | 165 |
166 // Tells the renderer to perform the given action on the media player | 166 // Tells the renderer to perform the given action on the media player |
167 // located at the given point. | 167 // located at the given point. |
168 virtual void ExecuteMediaPlayerActionAtLocation( | 168 virtual void ExecuteMediaPlayerActionAtLocation( |
169 const gfx::Point& location, | 169 const gfx::Point& location, |
170 const blink::WebMediaPlayerAction& action) = 0; | 170 const blink::WebMediaPlayerAction& action) = 0; |
171 | 171 |
172 // Runs some javascript within the context of a frame in the page. | 172 // Runs some javascript within the context of a frame in the page. |
173 virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, | 173 virtual void ExecuteJavascriptInWebFrame(const base::string16& frame_xpath, |
174 const string16& jscript) = 0; | 174 const base::string16& jscript) = 0; |
175 | 175 |
176 // Runs some javascript within the context of a frame in the page. The result | 176 // Runs some javascript within the context of a frame in the page. The result |
177 // is sent back via the provided callback. | 177 // is sent back via the provided callback. |
178 typedef base::Callback<void(const base::Value*)> JavascriptResultCallback; | 178 typedef base::Callback<void(const base::Value*)> JavascriptResultCallback; |
179 virtual void ExecuteJavascriptInWebFrameCallbackResult( | 179 virtual void ExecuteJavascriptInWebFrameCallbackResult( |
180 const string16& frame_xpath, | 180 const base::string16& frame_xpath, |
181 const string16& jscript, | 181 const base::string16& jscript, |
182 const JavascriptResultCallback& callback) = 0; | 182 const JavascriptResultCallback& callback) = 0; |
183 | 183 |
184 // Tells the renderer to perform the given action on the plugin located at | 184 // Tells the renderer to perform the given action on the plugin located at |
185 // the given point. | 185 // the given point. |
186 virtual void ExecutePluginActionAtLocation( | 186 virtual void ExecutePluginActionAtLocation( |
187 const gfx::Point& location, const blink::WebPluginAction& action) = 0; | 187 const gfx::Point& location, const blink::WebPluginAction& action) = 0; |
188 | 188 |
189 // Asks the renderer to exit fullscreen | 189 // Asks the renderer to exit fullscreen |
190 virtual void ExitFullscreen() = 0; | 190 virtual void ExitFullscreen() = 0; |
191 | 191 |
192 // Finds text on a page. | 192 // Finds text on a page. |
193 virtual void Find(int request_id, const string16& search_text, | 193 virtual void Find(int request_id, const base::string16& search_text, |
194 const blink::WebFindOptions& options) = 0; | 194 const blink::WebFindOptions& options) = 0; |
195 | 195 |
196 // Notifies the renderer that the user has closed the FindInPage window | 196 // Notifies the renderer that the user has closed the FindInPage window |
197 // (and what action to take regarding the selection). | 197 // (and what action to take regarding the selection). |
198 virtual void StopFinding(StopFindAction action) = 0; | 198 virtual void StopFinding(StopFindAction action) = 0; |
199 | 199 |
200 // Causes the renderer to invoke the onbeforeunload event handler. The | 200 // Causes the renderer to invoke the onbeforeunload event handler. The |
201 // result will be returned via ViewMsg_ShouldClose. See also ClosePage and | 201 // result will be returned via ViewMsg_ShouldClose. See also ClosePage and |
202 // SwapOut, which fire the PageUnload event. | 202 // SwapOut, which fire the PageUnload event. |
203 // | 203 // |
(...skipping 12 matching lines...) Expand all Loading... |
216 virtual RenderViewHostDelegate* GetDelegate() const = 0; | 216 virtual RenderViewHostDelegate* GetDelegate() const = 0; |
217 | 217 |
218 // Returns a bitwise OR of bindings types that have been enabled for this | 218 // Returns a bitwise OR of bindings types that have been enabled for this |
219 // RenderView. See BindingsPolicy for details. | 219 // RenderView. See BindingsPolicy for details. |
220 virtual int GetEnabledBindings() const = 0; | 220 virtual int GetEnabledBindings() const = 0; |
221 | 221 |
222 virtual SiteInstance* GetSiteInstance() const = 0; | 222 virtual SiteInstance* GetSiteInstance() const = 0; |
223 | 223 |
224 // Requests the renderer to evaluate an xpath to a frame and insert css | 224 // Requests the renderer to evaluate an xpath to a frame and insert css |
225 // into that frame's document. | 225 // into that frame's document. |
226 virtual void InsertCSS(const string16& frame_xpath, | 226 virtual void InsertCSS(const base::string16& frame_xpath, |
227 const std::string& css) = 0; | 227 const std::string& css) = 0; |
228 | 228 |
229 // Returns true if the RenderView is active and has not crashed. Virtual | 229 // Returns true if the RenderView is active and has not crashed. Virtual |
230 // because it is overridden by TestRenderViewHost. | 230 // because it is overridden by TestRenderViewHost. |
231 virtual bool IsRenderViewLive() const = 0; | 231 virtual bool IsRenderViewLive() const = 0; |
232 | 232 |
233 // Returns true if the RenderView is responsible for displaying a subframe | 233 // Returns true if the RenderView is responsible for displaying a subframe |
234 // in a different process from its parent page. | 234 // in a different process from its parent page. |
235 virtual bool IsSubframe() const = 0; | 235 virtual bool IsSubframe() const = 0; |
236 | 236 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 private: | 299 private: |
300 // This interface should only be implemented inside content. | 300 // This interface should only be implemented inside content. |
301 friend class RenderViewHostImpl; | 301 friend class RenderViewHostImpl; |
302 RenderViewHost() {} | 302 RenderViewHost() {} |
303 }; | 303 }; |
304 | 304 |
305 } // namespace content | 305 } // namespace content |
306 | 306 |
307 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ | 307 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_H_ |
OLD | NEW |