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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <string> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
14 #include "content/browser/webui/web_ui_impl.h" | 15 #include "content/browser/webui/web_ui_impl.h" |
15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
16 #include "content/common/frame_message_enums.h" | 17 #include "content/common/frame_message_enums.h" |
17 #include "content/public/browser/site_instance.h" | 18 #include "content/public/browser/site_instance.h" |
18 #include "content/public/common/javascript_message_type.h" | 19 #include "content/public/common/javascript_message_type.h" |
19 #include "content/public/common/media_stream_request.h" | 20 #include "content/public/common/media_stream_request.h" |
| 21 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" |
20 #include "net/http/http_response_headers.h" | 22 #include "net/http/http_response_headers.h" |
21 | 23 |
22 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
23 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
24 #endif | 26 #endif |
25 | 27 |
26 class GURL; | 28 class GURL; |
27 | 29 |
28 namespace IPC { | 30 namespace IPC { |
29 class Message; | 31 class Message; |
(...skipping 17 matching lines...) Expand all Loading... |
47 struct TransitionLayerData; | 49 struct TransitionLayerData; |
48 | 50 |
49 // An interface implemented by an object interested in knowing about the state | 51 // An interface implemented by an object interested in knowing about the state |
50 // of the RenderFrameHost. | 52 // of the RenderFrameHost. |
51 class CONTENT_EXPORT RenderFrameHostDelegate { | 53 class CONTENT_EXPORT RenderFrameHostDelegate { |
52 public: | 54 public: |
53 // This is used to give the delegate a chance to filter IPC messages. | 55 // This is used to give the delegate a chance to filter IPC messages. |
54 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, | 56 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, |
55 const IPC::Message& message); | 57 const IPC::Message& message); |
56 | 58 |
| 59 // Allows the delegate to filter incoming associated inteface requests. |
| 60 virtual void OnAssociatedInterfaceRequest( |
| 61 RenderFrameHost* render_frame_host, |
| 62 const std::string& interface_name, |
| 63 mojo::ScopedInterfaceEndpointHandle handle) {} |
| 64 |
57 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a | 65 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a |
58 // description of the semantics. | 66 // description of the semantics. |
59 virtual const GURL& GetMainFrameLastCommittedURL() const; | 67 virtual const GURL& GetMainFrameLastCommittedURL() const; |
60 | 68 |
61 // A message was added to to the console. | 69 // A message was added to to the console. |
62 virtual bool AddMessageToConsole(int32_t level, | 70 virtual bool AddMessageToConsole(int32_t level, |
63 const base::string16& message, | 71 const base::string16& message, |
64 int32_t line_no, | 72 int32_t line_no, |
65 const base::string16& source_id); | 73 const base::string16& source_id); |
66 | 74 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( | 209 virtual std::unique_ptr<WebUIImpl> CreateWebUIForRenderFrameHost( |
202 const GURL& url); | 210 const GURL& url); |
203 | 211 |
204 protected: | 212 protected: |
205 virtual ~RenderFrameHostDelegate() {} | 213 virtual ~RenderFrameHostDelegate() {} |
206 }; | 214 }; |
207 | 215 |
208 } // namespace content | 216 } // namespace content |
209 | 217 |
210 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 218 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
OLD | NEW |