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

Side by Side Diff: content/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: Created 9 years, 2 months 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_RENDERER_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_
6 #define CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ 6 #define CONTENT_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 RenderView; 18 class RenderView;
19 class SkBitmap; 19 class SkBitmap;
20 20
21 namespace WebKit { 21 namespace WebKit {
22 class WebFrame; 22 class WebFrame;
23 class WebPlugin; 23 class WebPlugin;
24 class WebURLRequest; 24 class WebURLRequest;
25 class WebMediaPlayerClient;
scherkus (not reviewing) 2011/10/03 18:19:45 alphabetize forward declares
Shishir 2011/10/04 23:02:39 Done.
25 struct WebPluginParams; 26 struct WebPluginParams;
26 struct WebURLError; 27 struct WebURLError;
27 } 28 }
28 29
30 namespace media {
31 class FilterCollection;
32 class MessageLoopFactory;
scherkus (not reviewing) 2011/10/03 18:19:45 alphabetize forward declares
Shishir 2011/10/04 23:02:39 Done.
33 class MediaLog;
34 }
35
36 namespace webkit_glue {
37 class MediaStreamClient;
38 class WebMediaPlayerImpl;
39 }
40
29 namespace v8 { 41 namespace v8 {
30 class Context; 42 class Context;
31 template<class T> class Handle; 43 template<class T> class Handle;
32 } 44 }
33 45
34 namespace content { 46 namespace content {
35 47
36 // Embedder API for participating in renderer logic. 48 // Embedder API for participating in renderer logic.
37 class ContentRendererClient { 49 class ContentRendererClient {
38 public: 50 public:
(...skipping 16 matching lines...) Expand all
55 67
56 // Allows the embedder to override creating a plugin. If it returns true, then 68 // Allows the embedder to override creating a plugin. If it returns true, then
57 // |plugin| will contain the created plugin, although it could be NULL. If it 69 // |plugin| will contain the created plugin, although it could be NULL. If it
58 // returns false, the content layer will create the plugin. 70 // returns false, the content layer will create the plugin.
59 virtual bool OverrideCreatePlugin( 71 virtual bool OverrideCreatePlugin(
60 RenderView* render_view, 72 RenderView* render_view,
61 WebKit::WebFrame* frame, 73 WebKit::WebFrame* frame,
62 const WebKit::WebPluginParams& params, 74 const WebKit::WebPluginParams& params,
63 WebKit::WebPlugin** plugin) = 0; 75 WebKit::WebPlugin** plugin) = 0;
64 76
77 // Returns true if the embedder should call OverrideCreateWebMediaPlayer to
78 // create WebMediaPlayers instead of the standard WebMediaPlayerImpl.
79 virtual bool ShouldOverrideCreateWebMediaPlayer(RenderView* view) = 0;
80
81 // Allows embedder to override creating a WebMediaPlayer. Should only be
82 // called if ShouldOverrideCreateWebMediaPlayer return true.
83 virtual void OverrideCreateWebMediaPlayer(
84 RenderView* render_view,
85 WebKit::WebMediaPlayerClient* client,
86 media::FilterCollection* collection,
87 media::MessageLoopFactory* message_loop_factory,
88 webkit_glue::MediaStreamClient* media_stream_client,
89 media::MediaLog* media_log,
90 webkit_glue::WebMediaPlayerImpl** player) = 0;
91
65 // Give the embedder the ability to set an error page. 92 // Give the embedder the ability to set an error page.
66 virtual void ShowErrorPage(RenderView* render_view, 93 virtual void ShowErrorPage(RenderView* render_view,
67 WebKit::WebFrame* frame, 94 WebKit::WebFrame* frame,
68 int http_status_code) = 0; 95 int http_status_code) = 0;
69 96
70 // Returns the html to display when a navigation error occurs. 97 // Returns the html to display when a navigation error occurs.
71 virtual std::string GetNavigationErrorHtml( 98 virtual std::string GetNavigationErrorHtml(
72 const WebKit::WebURLRequest& failed_request, 99 const WebKit::WebURLRequest& failed_request,
73 const WebKit::WebURLError& error) = 0; 100 const WebKit::WebURLError& error) = 0;
74 101
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const std::string& value) = 0; 155 const std::string& value) = 0;
129 156
130 // True if the protocol implemented to serve |url| supports features required 157 // True if the protocol implemented to serve |url| supports features required
131 // by the media engine. 158 // by the media engine.
132 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0; 159 virtual bool IsProtocolSupportedForMedia(const GURL& url) = 0;
133 }; 160 };
134 161
135 } // namespace content 162 } // namespace content
136 163
137 #endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_ 164 #endif // CONTENT_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698