| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CHROME_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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 | 591 |
| 592 // Called when |handler| has completed, so the delegate may release any | 592 // Called when |handler| has completed, so the delegate may release any |
| 593 // state accumulated. | 593 // state accumulated. |
| 594 virtual void OnAddClientCertificateFinished( | 594 virtual void OnAddClientCertificateFinished( |
| 595 scoped_refptr<SSLAddCertHandler> handler) = 0; | 595 scoped_refptr<SSLAddCertHandler> handler) = 0; |
| 596 | 596 |
| 597 protected: | 597 protected: |
| 598 virtual ~SSL() {} | 598 virtual ~SSL() {} |
| 599 }; | 599 }; |
| 600 | 600 |
| 601 // FileSelect ---------------------------------------------------------------- |
| 602 // Interface for handling file selection. |
| 603 |
| 604 class FileSelect { |
| 605 public: |
| 606 // A file chooser should be shown. |
| 607 virtual void RunFileChooser( |
| 608 const ViewHostMsg_RunFileChooser_Params& params) = 0; |
| 609 |
| 610 protected: |
| 611 virtual ~FileSelect() {} |
| 612 }; |
| 613 |
| 601 // --------------------------------------------------------------------------- | 614 // --------------------------------------------------------------------------- |
| 602 | 615 |
| 603 // Returns the current delegate associated with a feature. May return NULL if | 616 // Returns the current delegate associated with a feature. May return NULL if |
| 604 // there is no corresponding delegate. | 617 // there is no corresponding delegate. |
| 605 virtual View* GetViewDelegate(); | 618 virtual View* GetViewDelegate(); |
| 606 virtual RendererManagement* GetRendererManagementDelegate(); | 619 virtual RendererManagement* GetRendererManagementDelegate(); |
| 607 virtual BrowserIntegration* GetBrowserIntegrationDelegate(); | 620 virtual BrowserIntegration* GetBrowserIntegrationDelegate(); |
| 608 virtual Resource* GetResourceDelegate(); | 621 virtual Resource* GetResourceDelegate(); |
| 609 virtual ContentSettings* GetContentSettingsDelegate(); | 622 virtual ContentSettings* GetContentSettingsDelegate(); |
| 610 virtual Save* GetSaveDelegate(); | 623 virtual Save* GetSaveDelegate(); |
| 611 virtual Printing* GetPrintingDelegate(); | 624 virtual Printing* GetPrintingDelegate(); |
| 612 virtual FavIcon* GetFavIconDelegate(); | 625 virtual FavIcon* GetFavIconDelegate(); |
| 613 virtual Autocomplete* GetAutocompleteDelegate(); | 626 virtual Autocomplete* GetAutocompleteDelegate(); |
| 614 virtual AutoFill* GetAutoFillDelegate(); | 627 virtual AutoFill* GetAutoFillDelegate(); |
| 615 virtual BookmarkDrag* GetBookmarkDragDelegate(); | 628 virtual BookmarkDrag* GetBookmarkDragDelegate(); |
| 616 virtual BlockedPlugin* GetBlockedPluginDelegate(); | 629 virtual BlockedPlugin* GetBlockedPluginDelegate(); |
| 617 virtual SSL* GetSSLDelegate(); | 630 virtual SSL* GetSSLDelegate(); |
| 631 virtual FileSelect* GetFileSelectDelegate(); |
| 618 | 632 |
| 619 // Return the delegate for registering RenderViewHosts for automation resource | 633 // Return the delegate for registering RenderViewHosts for automation resource |
| 620 // routing. | 634 // routing. |
| 621 virtual AutomationResourceRoutingDelegate* | 635 virtual AutomationResourceRoutingDelegate* |
| 622 GetAutomationResourceRoutingDelegate(); | 636 GetAutomationResourceRoutingDelegate(); |
| 623 | 637 |
| 624 // Gets the URL that is currently being displayed, if there is one. | 638 // Gets the URL that is currently being displayed, if there is one. |
| 625 virtual const GURL& GetURL() const; | 639 virtual const GURL& GetURL() const; |
| 626 | 640 |
| 627 // Return this object cast to a TabContents, if it is one. If the object is | 641 // Return this object cast to a TabContents, if it is one. If the object is |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 virtual void ProcessDOMUIMessage( | 733 virtual void ProcessDOMUIMessage( |
| 720 const ViewHostMsg_DomMessage_Params& params) {} | 734 const ViewHostMsg_DomMessage_Params& params) {} |
| 721 | 735 |
| 722 // A message for external host. By default we ignore such messages. | 736 // A message for external host. By default we ignore such messages. |
| 723 // |receiver| can be a receiving script and |message| is any | 737 // |receiver| can be a receiving script and |message| is any |
| 724 // arbitrary string that makes sense to the receiver. | 738 // arbitrary string that makes sense to the receiver. |
| 725 virtual void ProcessExternalHostMessage(const std::string& message, | 739 virtual void ProcessExternalHostMessage(const std::string& message, |
| 726 const std::string& origin, | 740 const std::string& origin, |
| 727 const std::string& target) {} | 741 const std::string& target) {} |
| 728 | 742 |
| 729 // A file chooser should be shown. | |
| 730 virtual void RunFileChooser( | |
| 731 const ViewHostMsg_RunFileChooser_Params& params) {} | |
| 732 | |
| 733 // A javascript message, confirmation or prompt should be shown. | 743 // A javascript message, confirmation or prompt should be shown. |
| 734 virtual void RunJavaScriptMessage(const std::wstring& message, | 744 virtual void RunJavaScriptMessage(const std::wstring& message, |
| 735 const std::wstring& default_prompt, | 745 const std::wstring& default_prompt, |
| 736 const GURL& frame_url, | 746 const GURL& frame_url, |
| 737 const int flags, | 747 const int flags, |
| 738 IPC::Message* reply_msg, | 748 IPC::Message* reply_msg, |
| 739 bool* did_suppress_message) {} | 749 bool* did_suppress_message) {} |
| 740 | 750 |
| 741 virtual void RunBeforeUnloadConfirm(const std::wstring& message, | 751 virtual void RunBeforeUnloadConfirm(const std::wstring& message, |
| 742 IPC::Message* reply_msg) {} | 752 IPC::Message* reply_msg) {} |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 virtual void FocusedNodeChanged() {} | 818 virtual void FocusedNodeChanged() {} |
| 809 | 819 |
| 810 // The content being displayed is a PDF. | 820 // The content being displayed is a PDF. |
| 811 virtual void SetDisplayingPDFContent() {} | 821 virtual void SetDisplayingPDFContent() {} |
| 812 | 822 |
| 813 protected: | 823 protected: |
| 814 virtual ~RenderViewHostDelegate() {} | 824 virtual ~RenderViewHostDelegate() {} |
| 815 }; | 825 }; |
| 816 | 826 |
| 817 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 827 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| OLD | NEW |