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_PUBLIC_RENDERER_RENDER_FRAME_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "ipc/ipc_listener.h" | 10 #include "ipc/ipc_listener.h" |
11 #include "ipc/ipc_sender.h" | 11 #include "ipc/ipc_sender.h" |
12 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 12 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
13 | 13 |
14 struct WebPreferences; | 14 struct WebPreferences; |
15 | 15 |
16 namespace blink { | 16 namespace blink { |
17 class WebFrame; | 17 class WebFrame; |
18 class WebLocalFrame; | 18 class WebLocalFrame; |
19 class WebNode; | 19 class WebNode; |
20 class WebPlugin; | 20 class WebPlugin; |
21 class WebURLRequest; | 21 class WebURLRequest; |
22 struct WebPluginParams; | 22 struct WebPluginParams; |
23 } | 23 } |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 class ContextMenuClient; | 26 class ContextMenuClient; |
27 class RenderView; | 27 class RenderView; |
| 28 class ServiceRegistry; |
28 struct ContextMenuParams; | 29 struct ContextMenuParams; |
29 struct WebPluginInfo; | 30 struct WebPluginInfo; |
30 | 31 |
31 // This interface wraps functionality, which is specific to frames, such as | 32 // This interface wraps functionality, which is specific to frames, such as |
32 // navigation. It provides communication with a corresponding RenderFrameHost | 33 // navigation. It provides communication with a corresponding RenderFrameHost |
33 // in the browser process. | 34 // in the browser process. |
34 class CONTENT_EXPORT RenderFrame : public IPC::Listener, | 35 class CONTENT_EXPORT RenderFrame : public IPC::Listener, |
35 public IPC::Sender { | 36 public IPC::Sender { |
36 public: | 37 public: |
37 // Returns the RenderFrame given a WebFrame. | 38 // Returns the RenderFrame given a WebFrame. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual void LoadURLExternally(blink::WebLocalFrame* frame, | 82 virtual void LoadURLExternally(blink::WebLocalFrame* frame, |
82 const blink::WebURLRequest& request, | 83 const blink::WebURLRequest& request, |
83 blink::WebNavigationPolicy policy) = 0; | 84 blink::WebNavigationPolicy policy) = 0; |
84 | 85 |
85 // Execute a string of JavaScript in this frame's context. | 86 // Execute a string of JavaScript in this frame's context. |
86 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; | 87 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; |
87 | 88 |
88 // Return true if this frame is hidden. | 89 // Return true if this frame is hidden. |
89 virtual bool IsHidden() = 0; | 90 virtual bool IsHidden() = 0; |
90 | 91 |
| 92 // Returns the ServiceRegistry for this frame. |
| 93 virtual ServiceRegistry* GetServiceRegistry() = 0; |
| 94 |
91 protected: | 95 protected: |
92 virtual ~RenderFrame() {} | 96 virtual ~RenderFrame() {} |
93 | 97 |
94 private: | 98 private: |
95 // This interface should only be implemented inside content. | 99 // This interface should only be implemented inside content. |
96 friend class RenderFrameImpl; | 100 friend class RenderFrameImpl; |
97 RenderFrame() {} | 101 RenderFrame() {} |
98 }; | 102 }; |
99 | 103 |
100 } // namespace content | 104 } // namespace content |
101 | 105 |
102 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 106 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
OLD | NEW |