Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/public/renderer/content_renderer_client.h

Issue 8095007: Defer loading of audio/video tags while prerendering. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Syncing with depot. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 FilePath; 17 class FilePath;
17 class GURL; 18 class GURL;
18 class SkBitmap; 19 class SkBitmap;
19 20
20 namespace WebKit { 21 namespace WebKit {
21 class WebFrame; 22 class WebFrame;
23 class WebMediaPlayerClient;
22 class WebPlugin; 24 class WebPlugin;
23 class WebURLRequest; 25 class WebURLRequest;
24 struct WebPluginParams; 26 struct WebPluginParams;
25 struct WebURLError; 27 struct WebURLError;
26 } 28 }
27 29
28 namespace webkit { 30 namespace webkit {
29 namespace ppapi { 31 namespace ppapi {
30 class PpapiInterfaceFactoryManager; 32 class PpapiInterfaceFactoryManager;
31 } 33 }
32 } 34 }
33 35
36 namespace media {
37 class FilterCollection;
38 class MediaLog;
39 class MessageLoopFactory;
40 }
41
42 namespace webkit_glue {
43 class MediaStreamClient;
44 class WebMediaPlayerDelegate;
45 class WebMediaPlayerImpl;
46 }
47
34 namespace v8 { 48 namespace v8 {
35 class Context; 49 class Context;
36 template<class T> class Handle; 50 template<class T> class Handle;
37 } 51 }
38 52
39 namespace content { 53 namespace content {
40 54
41 class RenderView; 55 class RenderView;
42 56
43 // Embedder API for participating in renderer logic. 57 // Embedder API for participating in renderer logic.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // message describing the error that has occurred. 97 // message describing the error that has occurred.
84 // Either of the out parameters may be not written to in certain cases 98 // Either of the out parameters may be not written to in certain cases
85 // (lack of information on the error code) so the caller should take care to 99 // (lack of information on the error code) so the caller should take care to
86 // initialize the string values with safe defaults before the call. 100 // initialize the string values with safe defaults before the call.
87 virtual void GetNavigationErrorStrings( 101 virtual void GetNavigationErrorStrings(
88 const WebKit::WebURLRequest& failed_request, 102 const WebKit::WebURLRequest& failed_request,
89 const WebKit::WebURLError& error, 103 const WebKit::WebURLError& error,
90 std::string* error_html, 104 std::string* error_html,
91 string16* error_description) = 0; 105 string16* error_description) = 0;
92 106
107 // Returns true if the embedder should call OverrideCreateWebMediaPlayer to
108 // create WebMediaPlayers instead of the standard WebMediaPlayerImpl.
109 virtual bool ShouldOverrideCreateWebMediaPlayer(RenderView* view) = 0;
110
111 // Allows embedder to override creating a WebMediaPlayer. Should only be
112 // called if ShouldOverrideCreateWebMediaPlayer return true.
113 virtual void OverrideCreateWebMediaPlayer(
114 RenderView* render_view,
115 WebKit::WebMediaPlayerClient* client,
116 base::WeakPtr<webkit_glue::WebMediaPlayerDelegate> delegate,
117 media::FilterCollection* collection,
118 media::MessageLoopFactory* message_loop_factory,
119 webkit_glue::MediaStreamClient* media_stream_client,
120 media::MediaLog* media_log,
121 webkit_glue::WebMediaPlayerImpl** player) = 0;
122
93 // Returns true if the renderer process should schedule the idle handler when 123 // Returns true if the renderer process should schedule the idle handler when
94 // all widgets are hidden. 124 // all widgets are hidden.
95 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0; 125 virtual bool RunIdleHandlerWhenWidgetsHidden() = 0;
96 126
97 // Returns true if the given url can create popup windows. 127 // Returns true if the given url can create popup windows.
98 virtual bool AllowPopup(const GURL& creator) = 0; 128 virtual bool AllowPopup(const GURL& creator) = 0;
99 129
100 // Returns true if we should fork a new process for the given navigation. 130 // Returns true if we should fork a new process for the given navigation.
101 virtual bool ShouldFork(WebKit::WebFrame* frame, 131 virtual bool ShouldFork(WebKit::WebFrame* frame,
102 const GURL& url, 132 const GURL& url,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // by the media engine. 179 // by the media engine.
150 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; 180 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0;
151 181
152 virtual void RegisterPPAPIInterfaceFactories( 182 virtual void RegisterPPAPIInterfaceFactories(
153 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0; 183 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) = 0;
154 }; 184 };
155 185
156 } // namespace content 186 } // namespace content
157 187
158 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 188 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698