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_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 WindowOpenDisposition disposition) {} | 479 WindowOpenDisposition disposition) {} |
480 | 480 |
481 // A message for external host. By default we ignore such messages. | 481 // A message for external host. By default we ignore such messages. |
482 // |receiver| can be a receiving script and |message| is any | 482 // |receiver| can be a receiving script and |message| is any |
483 // arbitrary string that makes sense to the receiver. | 483 // arbitrary string that makes sense to the receiver. |
484 virtual void ProcessExternalHostMessage(const std::string& message, | 484 virtual void ProcessExternalHostMessage(const std::string& message, |
485 const std::string& origin, | 485 const std::string& origin, |
486 const std::string& target) {} | 486 const std::string& target) {} |
487 | 487 |
488 // A javascript message, confirmation or prompt should be shown. | 488 // A javascript message, confirmation or prompt should be shown. |
489 virtual void RunJavaScriptMessage(const std::wstring& message, | 489 virtual void RunJavaScriptMessage(const RenderViewHost* rvh, |
| 490 const std::wstring& message, |
490 const std::wstring& default_prompt, | 491 const std::wstring& default_prompt, |
491 const GURL& frame_url, | 492 const GURL& frame_url, |
492 const int flags, | 493 const int flags, |
493 IPC::Message* reply_msg, | 494 IPC::Message* reply_msg, |
494 bool* did_suppress_message) {} | 495 bool* did_suppress_message) {} |
495 | 496 |
496 virtual void RunBeforeUnloadConfirm(const std::wstring& message, | 497 virtual void RunBeforeUnloadConfirm(const RenderViewHost* rvh, |
| 498 const std::wstring& message, |
497 IPC::Message* reply_msg) {} | 499 IPC::Message* reply_msg) {} |
498 | 500 |
499 // |url| is assigned to a server that can provide alternate error pages. If | 501 // |url| is assigned to a server that can provide alternate error pages. If |
500 // the returned URL is empty, the default error page built into WebKit will | 502 // the returned URL is empty, the default error page built into WebKit will |
501 // be used. | 503 // be used. |
502 virtual GURL GetAlternateErrorPageURL() const; | 504 virtual GURL GetAlternateErrorPageURL() const; |
503 | 505 |
504 // Return a dummy RendererPreferences object that will be used by the renderer | 506 // Return a dummy RendererPreferences object that will be used by the renderer |
505 // associated with the owning RenderViewHost. | 507 // associated with the owning RenderViewHost. |
506 virtual RendererPreferences GetRendererPrefs(Profile* profile) const = 0; | 508 virtual RendererPreferences GetRendererPrefs(Profile* profile) const = 0; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 // Returns true if the delegate will take care of asking the user, otherwise | 557 // Returns true if the delegate will take care of asking the user, otherwise |
556 // the caller will do the default behavior. | 558 // the caller will do the default behavior. |
557 bool RequestDesktopNotificationPermission(const GURL& source_origin, | 559 bool RequestDesktopNotificationPermission(const GURL& source_origin, |
558 int callback_context); | 560 int callback_context); |
559 | 561 |
560 protected: | 562 protected: |
561 virtual ~RenderViewHostDelegate() {} | 563 virtual ~RenderViewHostDelegate() {} |
562 }; | 564 }; |
563 | 565 |
564 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 566 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
OLD | NEW |