| 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_media { |
| 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 // Allows embedder to override creating a WebMediaPlayer. If it returns |
| 107 // true, then |player| will contain the created player. Else the content |
| 108 // layer should create the media player. |
| 109 virtual bool OverrideCreateWebMediaPlayer( |
| 110 RenderView* render_view, |
| 111 WebKit::WebMediaPlayerClient* client, |
| 112 base::WeakPtr<webkit_media::WebMediaPlayerDelegate> delegate, |
| 113 media::FilterCollection* collection, |
| 114 media::MessageLoopFactory* message_loop_factory, |
| 115 webkit_media::MediaStreamClient* media_stream_client, |
| 116 media::MediaLog* media_log, |
| 117 webkit_media::WebMediaPlayerImpl** player) = 0; |
| 118 |
| 92 // Returns true if the renderer process should schedule the idle handler when | 119 // Returns true if the renderer process should schedule the idle handler when |
| 93 // all widgets are hidden. | 120 // all widgets are hidden. |
| 94 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; | 121 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; |
| 95 | 122 |
| 96 // Returns true if the given url can create popup windows. | 123 // Returns true if the given url can create popup windows. |
| 97 virtual bool AllowPopup(const GURL& creator) = 0; | 124 virtual bool AllowPopup(const GURL& creator) = 0; |
| 98 | 125 |
| 99 // Returns true if we should fork a new process for the given navigation. | 126 // Returns true if we should fork a new process for the given navigation. |
| 100 virtual bool ShouldFork(WebKit::WebFrame* frame, | 127 virtual bool ShouldFork(WebKit::WebFrame* frame, |
| 101 const GURL& url, | 128 const GURL& url, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 virtual void RegisterPPAPIInterfaceFactories( | 174 virtual void RegisterPPAPIInterfaceFactories( |
| 148 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; | 175 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; |
| 149 | 176 |
| 150 // Return true if given URL can use TCP/UDP socket APIs. | 177 // Return true if given URL can use TCP/UDP socket APIs. |
| 151 virtual bool AllowSocketAPI(const GURL& url) = 0; | 178 virtual bool AllowSocketAPI(const GURL& url) = 0; |
| 152 }; | 179 }; |
| 153 | 180 |
| 154 } // namespace content | 181 } // namespace content |
| 155 | 182 |
| 156 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 183 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |