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