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_BROWSER_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/common/console_message_level.h" | 13 #include "content/public/common/console_message_level.h" |
14 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
16 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 16 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
17 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 #include "url/origin.h" | 20 #include "url/origin.h" |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class Value; | 23 class Value; |
24 } | 24 } |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 class AudioOutputImpl; | |
nasko
2016/05/25 20:50:42
This is a violation of the content API. No Impl cl
rchtara
2016/05/27 15:24:39
Done.
| |
27 class RenderProcessHost; | 28 class RenderProcessHost; |
28 class RenderViewHost; | 29 class RenderViewHost; |
29 class RenderWidgetHostView; | 30 class RenderWidgetHostView; |
30 class ServiceRegistry; | 31 class ServiceRegistry; |
31 class SiteInstance; | 32 class SiteInstance; |
32 | 33 |
33 // The interface provides a communication conduit with a frame in the renderer. | 34 // The interface provides a communication conduit with a frame in the renderer. |
34 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, | 35 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
35 public IPC::Sender { | 36 public IPC::Sender { |
36 public: | 37 public: |
37 // Returns the RenderFrameHost given its ID and the ID of its render process. | 38 // Returns the RenderFrameHost given its ID and the ID of its render process. |
38 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. | 39 // Returns nullptr if the IDs do not correspond to a live RenderFrameHost. |
39 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); | 40 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); |
40 | 41 |
41 #if defined(OS_ANDROID) | 42 #if defined(OS_ANDROID) |
42 // Globally allows for injecting JavaScript into the main world. This feature | 43 // Globally allows for injecting JavaScript into the main world. This feature |
43 // is present only to support Android WebView and must not be used in other | 44 // is present only to support Android WebView and must not be used in other |
44 // configurations. | 45 // configurations. |
45 static void AllowInjectingJavaScriptForAndroidWebView(); | 46 static void AllowInjectingJavaScriptForAndroidWebView(); |
46 #endif | 47 #endif |
47 | 48 |
48 // Returns a RenderFrameHost given its accessibility tree ID. | 49 // Returns a RenderFrameHost given its accessibility tree ID. |
49 static RenderFrameHost* FromAXTreeID(int ax_tree_id); | 50 static RenderFrameHost* FromAXTreeID(int ax_tree_id); |
50 | 51 |
51 ~RenderFrameHost() override {} | 52 ~RenderFrameHost() override {} |
52 | 53 |
54 virtual AudioOutputImpl* GetAudioOutputImpl() = 0; | |
nasko
2016/05/25 20:50:42
These two methods are not used anywhere, please re
rchtara
2016/05/27 15:24:39
Done.
| |
55 | |
56 virtual void SetAudioOutputImpl(AudioOutputImpl* audio_output_impl) = 0; | |
nasko
2016/05/25 20:50:42
Why do we have a set method on the public interfac
rchtara
2016/05/27 15:24:39
Done.
| |
57 | |
53 // Returns the route id for this frame. | 58 // Returns the route id for this frame. |
54 virtual int GetRoutingID() = 0; | 59 virtual int GetRoutingID() = 0; |
55 | 60 |
56 // Returns the accessibility tree ID for this RenderFrameHost. | 61 // Returns the accessibility tree ID for this RenderFrameHost. |
57 virtual int GetAXTreeID() = 0; | 62 virtual int GetAXTreeID() = 0; |
58 | 63 |
59 // Returns the SiteInstance grouping all RenderFrameHosts that have script | 64 // Returns the SiteInstance grouping all RenderFrameHosts that have script |
60 // access to this RenderFrameHost, and must therefore live in the same | 65 // access to this RenderFrameHost, and must therefore live in the same |
61 // process. | 66 // process. |
62 virtual SiteInstance* GetSiteInstance() = 0; | 67 virtual SiteInstance* GetSiteInstance() = 0; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 | 188 |
184 private: | 189 private: |
185 // This interface should only be implemented inside content. | 190 // This interface should only be implemented inside content. |
186 friend class RenderFrameHostImpl; | 191 friend class RenderFrameHostImpl; |
187 RenderFrameHost() {} | 192 RenderFrameHost() {} |
188 }; | 193 }; |
189 | 194 |
190 } // namespace content | 195 } // namespace content |
191 | 196 |
192 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 197 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
OLD | NEW |