| 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 "ipc/ipc_message.h" | 12 #include "ipc/ipc_message.h" |
| 13 #include "content/common/content_client.h" | 13 #include "content/common/content_client.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" |
| 15 | 15 |
| 16 class FilePath; | 16 class FilePath; |
| 17 class GURL; | 17 class GURL; |
| 18 class SkBitmap; | 18 class SkBitmap; |
| 19 | 19 |
| 20 namespace WebKit { | 20 namespace WebKit { |
| 21 class WebFrame; | 21 class WebFrame; |
| 22 class WebPlugin; | 22 class WebPlugin; |
| 23 class WebMediaPlayerClient; |
| 23 class WebURLRequest; | 24 class WebURLRequest; |
| 24 struct WebPluginParams; | 25 struct WebPluginParams; |
| 25 struct WebURLError; | 26 struct WebURLError; |
| 26 } | 27 } |
| 27 | 28 |
| 29 namespace media { |
| 30 class FilterCollection; |
| 31 class MediaLog; |
| 32 class MessageLoopFactory; |
| 33 } |
| 34 |
| 35 namespace webkit_glue { |
| 36 class MediaStreamClient; |
| 37 class WebMediaPlayerImpl; |
| 38 } |
| 39 |
| 28 namespace v8 { | 40 namespace v8 { |
| 29 class Context; | 41 class Context; |
| 30 template<class T> class Handle; | 42 template<class T> class Handle; |
| 31 } | 43 } |
| 32 | 44 |
| 33 namespace content { | 45 namespace content { |
| 34 | 46 |
| 35 class RenderView; | 47 class RenderView; |
| 36 | 48 |
| 37 // Embedder API for participating in renderer logic. | 49 // Embedder API for participating in renderer logic. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // message describing the error that has occurred. | 89 // message describing the error that has occurred. |
| 78 // Either of the out parameters may be not written to in certain cases | 90 // Either of the out parameters may be not written to in certain cases |
| 79 // (lack of information on the error code) so the caller should take care to | 91 // (lack of information on the error code) so the caller should take care to |
| 80 // initialize the string values with safe defaults before the call. | 92 // initialize the string values with safe defaults before the call. |
| 81 virtual void GetNavigationErrorStrings( | 93 virtual void GetNavigationErrorStrings( |
| 82 const WebKit::WebURLRequest& failed_request, | 94 const WebKit::WebURLRequest& failed_request, |
| 83 const WebKit::WebURLError& error, | 95 const WebKit::WebURLError& error, |
| 84 std::string* error_html, | 96 std::string* error_html, |
| 85 string16* error_description) = 0; | 97 string16* error_description) = 0; |
| 86 | 98 |
| 99 // Returns true if the embedder should call OverrideCreateWebMediaPlayer to |
| 100 // create WebMediaPlayers instead of the standard WebMediaPlayerImpl. |
| 101 virtual bool ShouldOverrideCreateWebMediaPlayer(RenderView* view) = 0; |
| 102 |
| 103 // Allows embedder to override creating a WebMediaPlayer. Should only be |
| 104 // called if ShouldOverrideCreateWebMediaPlayer return true. |
| 105 virtual void OverrideCreateWebMediaPlayer( |
| 106 RenderView* render_view, |
| 107 WebKit::WebMediaPlayerClient* client, |
| 108 media::FilterCollection* collection, |
| 109 media::MessageLoopFactory* message_loop_factory, |
| 110 webkit_glue::MediaStreamClient* media_stream_client, |
| 111 media::MediaLog* media_log, |
| 112 webkit_glue::WebMediaPlayerImpl** player) = 0; |
| 113 |
| 87 // Returns true if the renderer process should schedule the idle handler when | 114 // Returns true if the renderer process should schedule the idle handler when |
| 88 // all widgets are hidden. | 115 // all widgets are hidden. |
| 89 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; | 116 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; |
| 90 | 117 |
| 91 // Returns true if the given url can create popup windows. | 118 // Returns true if the given url can create popup windows. |
| 92 virtual bool AllowPopup(const GURL& creator) = 0; | 119 virtual bool AllowPopup(const GURL& creator) = 0; |
| 93 | 120 |
| 94 // Returns true if we should fork a new process for the given navigation. | 121 // Returns true if we should fork a new process for the given navigation. |
| 95 virtual bool ShouldFork(WebKit::WebFrame* frame, | 122 virtual bool ShouldFork(WebKit::WebFrame* frame, |
| 96 const GURL& url, | 123 const GURL& url, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const std::string& value) = 0; | 167 const std::string& value) = 0; |
| 141 | 168 |
| 142 // True if the protocol implemented to serve |url| supports features required | 169 // True if the protocol implemented to serve |url| supports features required |
| 143 // by the media engine. | 170 // by the media engine. |
| 144 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; | 171 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; |
| 145 }; | 172 }; |
| 146 | 173 |
| 147 } // namespace content | 174 } // namespace content |
| 148 | 175 |
| 149 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 176 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |