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 "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/public/common/javascript_message_type.h" | 11 #include "content/public/common/javascript_message_type.h" |
12 | 12 |
13 class GURL; | 13 class GURL; |
14 | 14 |
15 namespace IPC { | 15 namespace IPC { |
16 class Message; | 16 class Message; |
17 } | 17 } |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 class RenderFrameHost; | 20 class RenderFrameHost; |
21 class WebContents; | 21 class WebContents; |
22 struct ContextMenuParams; | 22 struct ContextMenuParams; |
| 23 struct TransitionLayerData; |
23 | 24 |
24 // An interface implemented by an object interested in knowing about the state | 25 // An interface implemented by an object interested in knowing about the state |
25 // of the RenderFrameHost. | 26 // of the RenderFrameHost. |
26 class CONTENT_EXPORT RenderFrameHostDelegate { | 27 class CONTENT_EXPORT RenderFrameHostDelegate { |
27 public: | 28 public: |
28 // This is used to give the delegate a chance to filter IPC messages. | 29 // This is used to give the delegate a chance to filter IPC messages. |
29 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, | 30 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, |
30 const IPC::Message& message); | 31 const IPC::Message& message); |
31 | 32 |
32 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a | 33 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a |
(...skipping 17 matching lines...) Expand all Loading... |
50 // |to_different_document| will be true unless the load is a fragment | 51 // |to_different_document| will be true unless the load is a fragment |
51 // navigation, or triggered by history.pushState/replaceState. | 52 // navigation, or triggered by history.pushState/replaceState. |
52 virtual void DidStartLoading(RenderFrameHost* render_frame_host, | 53 virtual void DidStartLoading(RenderFrameHost* render_frame_host, |
53 bool to_different_document) {} | 54 bool to_different_document) {} |
54 | 55 |
55 // The RenderFrameHost has been swapped out. | 56 // The RenderFrameHost has been swapped out. |
56 virtual void SwappedOut(RenderFrameHost* render_frame_host) {} | 57 virtual void SwappedOut(RenderFrameHost* render_frame_host) {} |
57 | 58 |
58 // Notification that the navigation on the main frame is blocked waiting | 59 // Notification that the navigation on the main frame is blocked waiting |
59 // for transition to occur. | 60 // for transition to occur. |
60 virtual void DidDeferAfterResponseStarted() {} | 61 virtual void DidDeferAfterResponseStarted( |
| 62 const TransitionLayerData& transition_layer_data) {} |
61 | 63 |
62 // Used to query whether the navigation transition will be handled. | 64 // Used to query whether the navigation transition will be handled. |
63 virtual bool WillHandleDeferAfterResponseStarted(); | 65 virtual bool WillHandleDeferAfterResponseStarted(); |
64 | 66 |
65 // Notification that a worker process has crashed. | 67 // Notification that a worker process has crashed. |
66 virtual void WorkerCrashed(RenderFrameHost* render_frame_host) {} | 68 virtual void WorkerCrashed(RenderFrameHost* render_frame_host) {} |
67 | 69 |
68 // A context menu should be shown, to be built using the context information | 70 // A context menu should be shown, to be built using the context information |
69 // provided in the supplied params. | 71 // provided in the supplied params. |
70 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, | 72 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // not a WebContents, returns NULL. | 113 // not a WebContents, returns NULL. |
112 virtual WebContents* GetAsWebContents(); | 114 virtual WebContents* GetAsWebContents(); |
113 | 115 |
114 protected: | 116 protected: |
115 virtual ~RenderFrameHostDelegate() {} | 117 virtual ~RenderFrameHostDelegate() {} |
116 }; | 118 }; |
117 | 119 |
118 } // namespace content | 120 } // namespace content |
119 | 121 |
120 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 122 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
OLD | NEW |