OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 class FilePath; | 24 class FilePath; |
25 class MessageLoop; | 25 class MessageLoop; |
26 } | 26 } |
27 | 27 |
28 namespace WebKit { | 28 namespace WebKit { |
29 class WebClipboard; | 29 class WebClipboard; |
30 class WebFrame; | 30 class WebFrame; |
31 class WebHyphenator; | 31 class WebHyphenator; |
32 class WebMIDIAccessor; | 32 class WebMIDIAccessor; |
33 class WebMIDIAccessorClient; | 33 class WebMIDIAccessorClient; |
34 class WebMediaPlayerClient; | |
35 class WebMediaStreamCenter; | 34 class WebMediaStreamCenter; |
36 class WebMediaStreamCenterClient; | 35 class WebMediaStreamCenterClient; |
37 class WebPlugin; | 36 class WebPlugin; |
38 class WebPluginContainer; | 37 class WebPluginContainer; |
39 class WebPrescientNetworking; | 38 class WebPrescientNetworking; |
40 class WebRTCPeerConnectionHandler; | 39 class WebRTCPeerConnectionHandler; |
41 class WebRTCPeerConnectionHandlerClient; | 40 class WebRTCPeerConnectionHandlerClient; |
42 class WebSpeechSynthesizer; | 41 class WebSpeechSynthesizer; |
43 class WebSpeechSynthesizerClient; | 42 class WebSpeechSynthesizerClient; |
44 class WebThemeEngine; | 43 class WebThemeEngine; |
45 class WebURLRequest; | 44 class WebURLRequest; |
46 struct WebPluginParams; | 45 struct WebPluginParams; |
47 struct WebURLError; | 46 struct WebURLError; |
48 } | 47 } |
49 | 48 |
50 namespace webkit { | 49 namespace webkit { |
51 namespace ppapi { | 50 namespace ppapi { |
52 class PpapiInterfaceFactoryManager; | 51 class PpapiInterfaceFactoryManager; |
53 } | 52 } |
54 struct WebPluginInfo; | 53 struct WebPluginInfo; |
55 } | 54 } |
56 | 55 |
57 namespace webkit_media { | 56 namespace webkit_media { |
58 class WebMediaPlayerDelegate; | 57 class MediaLoadDelegate; |
59 class WebMediaPlayerImpl; | 58 class MediaStreamClient; |
60 class WebMediaPlayerParams; | |
61 } | 59 } |
62 | 60 |
63 namespace content { | 61 namespace content { |
64 | 62 |
65 class RenderView; | 63 class RenderView; |
66 class SynchronousCompositor; | 64 class SynchronousCompositor; |
67 | 65 |
68 // Embedder API for participating in renderer logic. | 66 // Embedder API for participating in renderer logic. |
69 class CONTENT_EXPORT ContentRendererClient { | 67 class CONTENT_EXPORT ContentRendererClient { |
70 public: | 68 public: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 // Either of the out parameters may be not written to in certain cases | 117 // Either of the out parameters may be not written to in certain cases |
120 // (lack of information on the error code) so the caller should take care to | 118 // (lack of information on the error code) so the caller should take care to |
121 // initialize the string values with safe defaults before the call. | 119 // initialize the string values with safe defaults before the call. |
122 virtual void GetNavigationErrorStrings( | 120 virtual void GetNavigationErrorStrings( |
123 WebKit::WebFrame* frame, | 121 WebKit::WebFrame* frame, |
124 const WebKit::WebURLRequest& failed_request, | 122 const WebKit::WebURLRequest& failed_request, |
125 const WebKit::WebURLError& error, | 123 const WebKit::WebURLError& error, |
126 std::string* error_html, | 124 std::string* error_html, |
127 string16* error_description) {} | 125 string16* error_description) {} |
128 | 126 |
129 // Allows embedder to override creating a WebMediaPlayerImpl. If it returns | 127 // Allows the embedder to control when media resources are loaded. Embedders |
130 // NULL the content layer will create the media player. | 128 // can run |closure| immediately if they never wish to defer media resource |
jam
2013/07/02 15:18:34
nit: "if they never wish" to "if they don't wish"
scherkus (not reviewing)
2013/07/02 18:36:19
Done.
| |
131 virtual webkit_media::WebMediaPlayerImpl* OverrideCreateWebMediaPlayer( | 129 // loading. |
132 RenderView* render_view, | 130 virtual void DeferMediaLoad(RenderView* render_view, |
133 WebKit::WebFrame* frame, | 131 const base::Closure& closure); |
134 WebKit::WebMediaPlayerClient* client, | |
135 base::WeakPtr<webkit_media::WebMediaPlayerDelegate> delegate, | |
136 const webkit_media::WebMediaPlayerParams& params); | |
137 | 132 |
138 // Allows the embedder to override creating a WebMediaStreamCenter. If it | 133 // Allows the embedder to override creating a WebMediaStreamCenter. If it |
139 // returns NULL the content layer will create the stream center. | 134 // returns NULL the content layer will create the stream center. |
140 virtual WebKit::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( | 135 virtual WebKit::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( |
141 WebKit::WebMediaStreamCenterClient* client); | 136 WebKit::WebMediaStreamCenterClient* client); |
142 | 137 |
143 // Allows the embedder to override creating a WebRTCPeerConnectionHandler. If | 138 // Allows the embedder to override creating a WebRTCPeerConnectionHandler. If |
144 // it returns NULL the content layer will create the connection handler. | 139 // it returns NULL the content layer will create the connection handler. |
145 virtual WebKit::WebRTCPeerConnectionHandler* | 140 virtual WebKit::WebRTCPeerConnectionHandler* |
146 OverrideCreateWebRTCPeerConnectionHandler( | 141 OverrideCreateWebRTCPeerConnectionHandler( |
147 WebKit::WebRTCPeerConnectionHandlerClient* client); | 142 WebKit::WebRTCPeerConnectionHandlerClient* client); |
148 | 143 |
144 // Allows the embedder to override creating a MediaStreamClient. If it returns | |
145 // NULL the content layer will create the media stream client. | |
146 virtual webkit_media::MediaStreamClient* OverrideCreateMediaStreamClient(); | |
147 | |
149 // Allows the embedder to override creating a WebMIDIAccessor. If it | 148 // Allows the embedder to override creating a WebMIDIAccessor. If it |
150 // returns NULL the content layer will create the MIDI accessor. | 149 // returns NULL the content layer will create the MIDI accessor. |
151 virtual WebKit::WebMIDIAccessor* OverrideCreateMIDIAccessor( | 150 virtual WebKit::WebMIDIAccessor* OverrideCreateMIDIAccessor( |
152 WebKit::WebMIDIAccessorClient* client); | 151 WebKit::WebMIDIAccessorClient* client); |
153 | 152 |
154 // Allows the embedder to override the WebKit::WebClipboard used. If it | 153 // Allows the embedder to override the WebKit::WebClipboard used. If it |
155 // returns NULL the content layer will handle clipboard interactions. | 154 // returns NULL the content layer will handle clipboard interactions. |
156 virtual WebKit::WebClipboard* OverrideWebClipboard(); | 155 virtual WebKit::WebClipboard* OverrideWebClipboard(); |
157 | 156 |
158 // Allows the embedder to override the WebKit::WebHyphenator used. If it | 157 // Allows the embedder to override the WebKit::WebHyphenator used. If it |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
247 // Returns whether BrowserPlugin should be allowed within the |container|. | 246 // Returns whether BrowserPlugin should be allowed within the |container|. |
248 virtual bool AllowBrowserPlugin(WebKit::WebPluginContainer* container) const; | 247 virtual bool AllowBrowserPlugin(WebKit::WebPluginContainer* container) const; |
249 | 248 |
250 // Returns true if the page at |url| can use Pepper MediaStream APIs. | 249 // Returns true if the page at |url| can use Pepper MediaStream APIs. |
251 virtual bool AllowPepperMediaStreamAPI(const GURL& url) const; | 250 virtual bool AllowPepperMediaStreamAPI(const GURL& url) const; |
252 }; | 251 }; |
253 | 252 |
254 } // namespace content | 253 } // namespace content |
255 | 254 |
256 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 255 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |