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

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

Issue 2712983004: Simplify/Cleanup MediaClient (Closed)
Patch Set: Fix test leak Created 3 years, 8 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "base/task_scheduler/task_scheduler.h" 18 #include "base/task_scheduler/task_scheduler.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "content/public/common/content_client.h" 20 #include "content/public/common/content_client.h"
21 #include "media/base/decode_capabilities.h"
21 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 22 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
22 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 23 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
23 #include "third_party/WebKit/public/web/WebNavigationType.h" 24 #include "third_party/WebKit/public/web/WebNavigationType.h"
24 #include "ui/base/page_transition_types.h" 25 #include "ui/base/page_transition_types.h"
25 #include "v8/include/v8.h" 26 #include "v8/include/v8.h"
26 27
27 class GURL; 28 class GURL;
28 class SkBitmap; 29 class SkBitmap;
29 30
30 namespace base { 31 namespace base {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Returns true if the page at |url| can use Pepper MediaStream APIs. 257 // Returns true if the page at |url| can use Pepper MediaStream APIs.
257 virtual bool AllowPepperMediaStreamAPI(const GURL& url); 258 virtual bool AllowPepperMediaStreamAPI(const GURL& url);
258 259
259 // Allows an embedder to provide a MediaStreamRendererFactory. 260 // Allows an embedder to provide a MediaStreamRendererFactory.
260 virtual std::unique_ptr<MediaStreamRendererFactory> 261 virtual std::unique_ptr<MediaStreamRendererFactory>
261 CreateMediaStreamRendererFactory(); 262 CreateMediaStreamRendererFactory();
262 263
263 // Allows an embedder to provide a default image decode color space. 264 // Allows an embedder to provide a default image decode color space.
264 virtual std::unique_ptr<gfx::ICCProfile> GetImageDecodeColorProfile(); 265 virtual std::unique_ptr<gfx::ICCProfile> GetImageDecodeColorProfile();
265 266
266 // Gives the embedder a chance to register the key system(s) it supports by 267 // Allows embedder to register the key system(s) it supports by populating
267 // populating |key_systems|. 268 // |key_systems|.
268 virtual void AddSupportedKeySystems( 269 virtual void AddSupportedKeySystems(
269 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems); 270 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems);
270 271
272 // Signal that embedder has changed key systems.
273 // TODO(chcunningham): Refactor this to a proper change "observer" API that is
274 // less fragile (don't assume AddSupportedKeySystems has just one caller).
275 virtual bool IsKeySystemsUpdateNeeded();
276
277 // Allows embedder to describe customized audio capabilities.
278 virtual bool IsSupportedAudioConfig(const media::AudioConfig& config);
279
280 // Allows embedder to describe customized video capabilities.
281 virtual bool IsSupportedVideoConfig(const media::VideoConfig& config);
282
271 // Returns true if we should report a detailed message (including a stack 283 // Returns true if we should report a detailed message (including a stack
272 // trace) for console [logs|errors|exceptions]. |source| is the WebKit- 284 // trace) for console [logs|errors|exceptions]. |source| is the WebKit-
273 // reported source for the error; this can point to a page or a script, 285 // reported source for the error; this can point to a page or a script,
274 // and can be external or internal. 286 // and can be external or internal.
275 virtual bool ShouldReportDetailedMessageForSource( 287 virtual bool ShouldReportDetailedMessageForSource(
276 const base::string16& source) const; 288 const base::string16& source) const;
277 289
278 // Returns true if we should gather stats during resource loads as if the 290 // Returns true if we should gather stats during resource loads as if the
279 // cross-site document blocking policy were enabled. Does not actually block 291 // cross-site document blocking policy were enabled. Does not actually block
280 // any pages. 292 // any pages.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 virtual std::unique_ptr<base::TaskScheduler::InitParams> 375 virtual std::unique_ptr<base::TaskScheduler::InitParams>
364 GetTaskSchedulerInitParams(); 376 GetTaskSchedulerInitParams();
365 377
366 // Returns true if the media pipeline can be suspended, or false otherwise. 378 // Returns true if the media pipeline can be suspended, or false otherwise.
367 virtual bool AllowMediaSuspend(); 379 virtual bool AllowMediaSuspend();
368 }; 380 };
369 381
370 } // namespace content 382 } // namespace content
371 383
372 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 384 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW
« no previous file with comments | « components/cdm/renderer/android_key_systems.cc ('k') | content/public/renderer/content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698