OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 // Runs some javascript within the context of a frame in the page. | 248 // Runs some javascript within the context of a frame in the page. |
249 void ExecuteJavascriptInWebFrame(const string16& frame_xpath, | 249 void ExecuteJavascriptInWebFrame(const string16& frame_xpath, |
250 const string16& jscript); | 250 const string16& jscript); |
251 | 251 |
252 // Runs some javascript within the context of a frame in the page. The result | 252 // Runs some javascript within the context of a frame in the page. The result |
253 // is sent back via the notification EXECUTE_JAVASCRIPT_RESULT. | 253 // is sent back via the notification EXECUTE_JAVASCRIPT_RESULT. |
254 int ExecuteJavascriptInWebFrameNotifyResult(const string16& frame_xpath, | 254 int ExecuteJavascriptInWebFrameNotifyResult(const string16& frame_xpath, |
255 const string16& jscript); | 255 const string16& jscript); |
256 | 256 |
257 // Edit operations. | |
258 void Undo(); | |
259 void Redo(); | |
260 void Cut(); | |
261 void Copy(); | |
262 void CopyToFindPboard(); | |
263 void Paste(); | |
264 void Delete(); | |
265 void SelectAll(); | |
266 | |
267 // Notifies the RenderView that the JavaScript message that was shown was | 257 // Notifies the RenderView that the JavaScript message that was shown was |
268 // closed by the user. | 258 // closed by the user. |
269 void JavaScriptDialogClosed(IPC::Message* reply_msg, | 259 void JavaScriptDialogClosed(IPC::Message* reply_msg, |
270 bool success, | 260 bool success, |
271 const string16& user_input); | 261 const string16& user_input); |
272 | 262 |
273 // Notifies the renderer that a a drag operation that it started has ended, | 263 // Notifies the renderer that a a drag operation that it started has ended, |
274 // either in a drop or by being cancelled. | 264 // either in a drop or by being cancelled. |
275 void DragSourceEndedAt( | 265 void DragSourceEndedAt( |
276 int client_x, int client_y, int screen_x, int screen_y, | 266 int client_x, int client_y, int screen_x, int screen_y, |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 367 |
378 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } | 368 bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } |
379 #endif | 369 #endif |
380 | 370 |
381 // Checks that the given renderer can request |url|, if not it sets it to an | 371 // Checks that the given renderer can request |url|, if not it sets it to an |
382 // empty url. | 372 // empty url. |
383 static void FilterURL(ChildProcessSecurityPolicy* policy, | 373 static void FilterURL(ChildProcessSecurityPolicy* policy, |
384 int renderer_id, | 374 int renderer_id, |
385 GURL* url); | 375 GURL* url); |
386 | 376 |
| 377 // Sets the alternate error page URL (link doctor) for the renderer process. |
| 378 void SetAltErrorPageURL(const GURL& url); |
| 379 |
| 380 // Asks the renderer to exit fullscreen |
| 381 void ExitFullscreen(); |
| 382 |
| 383 // Passes a list of Webkit preferences to the renderer. |
| 384 void UpdateWebkitPreferences(const WebPreferences& prefs); |
| 385 |
| 386 // Tells the renderer to clear the focused node (if any). |
| 387 void ClearFocusedNode(); |
| 388 |
387 // NOTE: Do not add functions that just send an IPC message that are called in | 389 // NOTE: Do not add functions that just send an IPC message that are called in |
388 // one or two places. Have the caller send the IPC message directly. | 390 // one or two places. Have the caller send the IPC message directly. |
389 | 391 |
390 protected: | 392 protected: |
391 friend class RenderViewHostObserver; | 393 friend class RenderViewHostObserver; |
392 | 394 |
393 // Add and remove observers for filtering IPC messages. Clients must be sure | 395 // Add and remove observers for filtering IPC messages. Clients must be sure |
394 // to remove the observer before they go away. | 396 // to remove the observer before they go away. |
395 void AddObserver(RenderViewHostObserver* observer); | 397 void AddObserver(RenderViewHostObserver* observer); |
396 void RemoveObserver(RenderViewHostObserver* observer); | 398 void RemoveObserver(RenderViewHostObserver* observer); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 // The termination status of the last render view that terminated. | 566 // The termination status of the last render view that terminated. |
565 base::TerminationStatus render_view_termination_status_; | 567 base::TerminationStatus render_view_termination_status_; |
566 | 568 |
567 // A list of observers that filter messages. Weak references. | 569 // A list of observers that filter messages. Weak references. |
568 ObserverList<RenderViewHostObserver> observers_; | 570 ObserverList<RenderViewHostObserver> observers_; |
569 | 571 |
570 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 572 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
571 }; | 573 }; |
572 | 574 |
573 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 575 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |