OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/memory/weak_ptr.h" |
12 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
13 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" |
15 | 16 |
16 class GURL; | 17 class GURL; |
17 class SkBitmap; | 18 class SkBitmap; |
18 | 19 |
19 namespace WebKit { | 20 namespace WebKit { |
20 class WebFrame; | 21 class WebFrame; |
| 22 class WebMediaPlayerClient; |
21 class WebPlugin; | 23 class WebPlugin; |
22 class WebURLRequest; | 24 class WebURLRequest; |
23 struct WebPluginParams; | 25 struct WebPluginParams; |
24 struct WebURLError; | 26 struct WebURLError; |
25 } | 27 } |
26 | 28 |
27 namespace webkit { | 29 namespace webkit { |
28 namespace ppapi { | 30 namespace ppapi { |
29 class PpapiInterfaceFactoryManager; | 31 class PpapiInterfaceFactoryManager; |
30 } | 32 } |
31 } | 33 } |
32 | 34 |
| 35 namespace media { |
| 36 class FilterCollection; |
| 37 class MediaLog; |
| 38 class MessageLoopFactory; |
| 39 } |
| 40 |
| 41 namespace webkit_glue { |
| 42 class MediaStreamClient; |
| 43 class WebMediaPlayerDelegate; |
| 44 class WebMediaPlayerImpl; |
| 45 } |
| 46 |
33 namespace v8 { | 47 namespace v8 { |
34 class Context; | 48 class Context; |
35 template<class T> class Handle; | 49 template<class T> class Handle; |
36 } | 50 } |
37 | 51 |
38 namespace content { | 52 namespace content { |
39 | 53 |
40 class RenderView; | 54 class RenderView; |
41 | 55 |
42 // Embedder API for participating in renderer logic. | 56 // Embedder API for participating in renderer logic. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // message describing the error that has occurred. | 96 // message describing the error that has occurred. |
83 // Either of the out parameters may be not written to in certain cases | 97 // Either of the out parameters may be not written to in certain cases |
84 // (lack of information on the error code) so the caller should take care to | 98 // (lack of information on the error code) so the caller should take care to |
85 // initialize the string values with safe defaults before the call. | 99 // initialize the string values with safe defaults before the call. |
86 virtual void GetNavigationErrorStrings( | 100 virtual void GetNavigationErrorStrings( |
87 const WebKit::WebURLRequest& failed_request, | 101 const WebKit::WebURLRequest& failed_request, |
88 const WebKit::WebURLError& error, | 102 const WebKit::WebURLError& error, |
89 std::string* error_html, | 103 std::string* error_html, |
90 string16* error_description) = 0; | 104 string16* error_description) = 0; |
91 | 105 |
| 106 // Returns true if the embedder should call OverrideCreateWebMediaPlayer to |
| 107 // create WebMediaPlayers instead of the standard WebMediaPlayerImpl. |
| 108 virtual bool ShouldOverrideCreateWebMediaPlayer(RenderView* view) = 0; |
| 109 |
| 110 // Allows embedder to override creating a WebMediaPlayer. Should only be |
| 111 // called if ShouldOverrideCreateWebMediaPlayer return true. |
| 112 virtual void OverrideCreateWebMediaPlayer( |
| 113 RenderView* render_view, |
| 114 WebKit::WebMediaPlayerClient* client, |
| 115 base::WeakPtr<webkit_glue::WebMediaPlayerDelegate> delegate, |
| 116 media::FilterCollection* collection, |
| 117 media::MessageLoopFactory* message_loop_factory, |
| 118 webkit_glue::MediaStreamClient* media_stream_client, |
| 119 media::MediaLog* media_log, |
| 120 webkit_glue::WebMediaPlayerImpl** player) = 0; |
| 121 |
92 // Returns true if the renderer process should schedule the idle handler when | 122 // Returns true if the renderer process should schedule the idle handler when |
93 // all widgets are hidden. | 123 // all widgets are hidden. |
94 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; | 124 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; |
95 | 125 |
96 // Returns true if the given url can create popup windows. | 126 // Returns true if the given url can create popup windows. |
97 virtual bool AllowPopup(const GURL& creator) = 0; | 127 virtual bool AllowPopup(const GURL& creator) = 0; |
98 | 128 |
99 // Returns true if we should fork a new process for the given navigation. | 129 // Returns true if we should fork a new process for the given navigation. |
100 virtual bool ShouldFork(WebKit::WebFrame* frame, | 130 virtual bool ShouldFork(WebKit::WebFrame* frame, |
101 const GURL& url, | 131 const GURL& url, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // by the media engine. | 178 // by the media engine. |
149 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; | 179 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; |
150 | 180 |
151 virtual void RegisterPPAPIInterfaceFactories( | 181 virtual void RegisterPPAPIInterfaceFactories( |
152 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; | 182 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; |
153 }; | 183 }; |
154 | 184 |
155 } // namespace content | 185 } // namespace content |
156 | 186 |
157 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 187 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |