| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/common/javascript_message_type.h" |
| 10 | 11 |
| 11 class GURL; | 12 class GURL; |
| 12 | 13 |
| 13 namespace IPC { | 14 namespace IPC { |
| 14 class Message; | 15 class Message; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 class RenderFrameHost; | 19 class RenderFrameHost; |
| 19 class WebContents; | 20 class WebContents; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 virtual void SwappedOut(RenderFrameHost* render_frame_host) {} | 59 virtual void SwappedOut(RenderFrameHost* render_frame_host) {} |
| 59 | 60 |
| 60 // Notification that a worker process has crashed. | 61 // Notification that a worker process has crashed. |
| 61 virtual void WorkerCrashed(RenderFrameHost* render_frame_host) {} | 62 virtual void WorkerCrashed(RenderFrameHost* render_frame_host) {} |
| 62 | 63 |
| 63 // A context menu should be shown, to be built using the context information | 64 // A context menu should be shown, to be built using the context information |
| 64 // provided in the supplied params. | 65 // provided in the supplied params. |
| 65 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, | 66 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
| 66 const ContextMenuParams& params) {} | 67 const ContextMenuParams& params) {} |
| 67 | 68 |
| 69 // A JavaScript message, confirmation or prompt should be shown. |
| 70 virtual void RunJavaScriptMessage(RenderFrameHost* rfh, |
| 71 const base::string16& message, |
| 72 const base::string16& default_prompt, |
| 73 const GURL& frame_url, |
| 74 JavaScriptMessageType type, |
| 75 IPC::Message* reply_msg, |
| 76 bool* did_suppress_message) {} |
| 77 |
| 78 virtual void RunBeforeUnloadConfirm(RenderFrameHost* rfh, |
| 79 const base::string16& message, |
| 80 bool is_reload, |
| 81 IPC::Message* reply_msg) {} |
| 82 |
| 68 // Return this object cast to a WebContents, if it is one. If the object is | 83 // Return this object cast to a WebContents, if it is one. If the object is |
| 69 // not a WebContents, returns NULL. | 84 // not a WebContents, returns NULL. |
| 70 virtual WebContents* GetAsWebContents(); | 85 virtual WebContents* GetAsWebContents(); |
| 71 | 86 |
| 72 protected: | 87 protected: |
| 73 virtual ~RenderFrameHostDelegate() {} | 88 virtual ~RenderFrameHostDelegate() {} |
| 74 }; | 89 }; |
| 75 | 90 |
| 76 } // namespace content | 91 } // namespace content |
| 77 | 92 |
| 78 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 93 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
| OLD | NEW |