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; | |
29 struct ContextMenuParams; | 28 struct ContextMenuParams; |
30 struct WebPluginInfo; | 29 struct WebPluginInfo; |
31 | 30 |
32 // This interface wraps functionality, which is specific to frames, such as | 31 // This interface wraps functionality, which is specific to frames, such as |
33 // navigation. It provides communication with a corresponding RenderFrameHost | 32 // navigation. It provides communication with a corresponding RenderFrameHost |
34 // in the browser process. | 33 // in the browser process. |
35 class CONTENT_EXPORT RenderFrame : public IPC::Listener, | 34 class CONTENT_EXPORT RenderFrame : public IPC::Listener, |
36 public IPC::Sender { | 35 public IPC::Sender { |
37 public: | 36 public: |
38 // Returns the RenderFrame given a WebFrame. | 37 // Returns the RenderFrame given a WebFrame. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual void LoadURLExternally(blink::WebLocalFrame* frame, | 81 virtual void LoadURLExternally(blink::WebLocalFrame* frame, |
83 const blink::WebURLRequest& request, | 82 const blink::WebURLRequest& request, |
84 blink::WebNavigationPolicy policy) = 0; | 83 blink::WebNavigationPolicy policy) = 0; |
85 | 84 |
86 // Execute a string of JavaScript in this frame's context. | 85 // Execute a string of JavaScript in this frame's context. |
87 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; | 86 virtual void ExecuteJavaScript(const base::string16& javascript) = 0; |
88 | 87 |
89 // Return true if this frame is hidden. | 88 // Return true if this frame is hidden. |
90 virtual bool IsHidden() = 0; | 89 virtual bool IsHidden() = 0; |
91 | 90 |
92 // Returns the ServiceRegistry for this frame. | |
93 virtual ServiceRegistry* GetServiceRegistry() = 0; | |
94 | |
95 protected: | 91 protected: |
96 virtual ~RenderFrame() {} | 92 virtual ~RenderFrame() {} |
97 | 93 |
98 private: | 94 private: |
99 // This interface should only be implemented inside content. | 95 // This interface should only be implemented inside content. |
100 friend class RenderFrameImpl; | 96 friend class RenderFrameImpl; |
101 RenderFrame() {} | 97 RenderFrame() {} |
102 }; | 98 }; |
103 | 99 |
104 } // namespace content | 100 } // namespace content |
105 | 101 |
106 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ | 102 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_H_ |
OLD | NEW |