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

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

Issue 1292433002: Defer media playback in background tabs. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build.gn Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 blink::WebFrame* frame, 146 blink::WebFrame* frame,
147 const blink::WebURLRequest& failed_request, 147 const blink::WebURLRequest& failed_request,
148 const blink::WebURLError& error, 148 const blink::WebURLError& error,
149 std::string* error_html, 149 std::string* error_html,
150 base::string16* error_description) {} 150 base::string16* error_description) {}
151 151
152 // Allows the embedder to control when media resources are loaded. Embedders 152 // Allows the embedder to control when media resources are loaded. Embedders
153 // can run |closure| immediately if they don't wish to defer media resource 153 // can run |closure| immediately if they don't wish to defer media resource
154 // loading. 154 // loading.
155 virtual void DeferMediaLoad(RenderFrame* render_frame, 155 virtual void DeferMediaLoad(RenderFrame* render_frame,
156 bool render_frame_has_played_media_before,
Charlie Reis 2015/08/18 17:30:03 Maybe |has_played_media_before|? The render frame
DaleCurtis 2015/08/18 18:19:12 Done.
156 const base::Closure& closure); 157 const base::Closure& closure);
157 158
158 // Allows the embedder to override creating a WebMediaStreamCenter. If it 159 // Allows the embedder to override creating a WebMediaStreamCenter. If it
159 // returns NULL the content layer will create the stream center. 160 // returns NULL the content layer will create the stream center.
160 virtual blink::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( 161 virtual blink::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter(
161 blink::WebMediaStreamCenterClient* client); 162 blink::WebMediaStreamCenterClient* client);
162 163
163 // Allows the embedder to override creating a WebRTCPeerConnectionHandler. If 164 // Allows the embedder to override creating a WebRTCPeerConnectionHandler. If
164 // it returns NULL the content layer will create the connection handler. 165 // it returns NULL the content layer will create the connection handler.
165 virtual blink::WebRTCPeerConnectionHandler* 166 virtual blink::WebRTCPeerConnectionHandler*
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Gives the embedder a chance to add properties to the context menu. 296 // Gives the embedder a chance to add properties to the context menu.
296 // Currently only called when the context menu is for an image. 297 // Currently only called when the context menu is for an image.
297 virtual void AddImageContextMenuProperties( 298 virtual void AddImageContextMenuProperties(
298 const blink::WebURLResponse& response, 299 const blink::WebURLResponse& response,
299 std::map<std::string, std::string>* properties) {} 300 std::map<std::string, std::string>* properties) {}
300 }; 301 };
301 302
302 } // namespace content 303 } // namespace content
303 304
304 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 305 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698