| OLD | NEW |
| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // Returns true if the page at |url| can use Pepper MediaStream APIs. | 258 // Returns true if the page at |url| can use Pepper MediaStream APIs. |
| 258 virtual bool AllowPepperMediaStreamAPI(const GURL& url); | 259 virtual bool AllowPepperMediaStreamAPI(const GURL& url); |
| 259 | 260 |
| 260 // Allows an embedder to provide a MediaStreamRendererFactory. | 261 // Allows an embedder to provide a MediaStreamRendererFactory. |
| 261 virtual std::unique_ptr<MediaStreamRendererFactory> | 262 virtual std::unique_ptr<MediaStreamRendererFactory> |
| 262 CreateMediaStreamRendererFactory(); | 263 CreateMediaStreamRendererFactory(); |
| 263 | 264 |
| 264 // Allows an embedder to provide a default image decode color space. | 265 // Allows an embedder to provide a default image decode color space. |
| 265 virtual std::unique_ptr<gfx::ICCProfile> GetImageDecodeColorProfile(); | 266 virtual std::unique_ptr<gfx::ICCProfile> GetImageDecodeColorProfile(); |
| 266 | 267 |
| 267 // Gives the embedder a chance to register the key system(s) it supports by | 268 // Allows embedder to register the key system(s) it supports by populating |
| 268 // populating |key_systems|. | 269 // |key_systems|. |
| 269 virtual void AddSupportedKeySystems( | 270 virtual void AddSupportedKeySystems( |
| 270 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems); | 271 std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems); |
| 271 | 272 |
| 273 // Signal that embedder has changed key systems. |
| 274 // TODO(chcunningham): Refactor this to a proper change "observer" API that is |
| 275 // less fragile (don't assume AddSupportedKeySystems has just one caller). |
| 276 virtual bool IsKeySystemsUpdateNeeded(); |
| 277 |
| 278 // Allows embedder to describe customized audio capabilities. |
| 279 virtual bool IsSupportedAudioConfig(const media::AudioConfig& config); |
| 280 |
| 281 // Allows embedder to describe customized video capabilities. |
| 282 virtual bool IsSupportedVideoConfig(const media::VideoConfig& config); |
| 283 |
| 272 // Returns true if we should report a detailed message (including a stack | 284 // Returns true if we should report a detailed message (including a stack |
| 273 // trace) for console [logs|errors|exceptions]. |source| is the WebKit- | 285 // trace) for console [logs|errors|exceptions]. |source| is the WebKit- |
| 274 // reported source for the error; this can point to a page or a script, | 286 // reported source for the error; this can point to a page or a script, |
| 275 // and can be external or internal. | 287 // and can be external or internal. |
| 276 virtual bool ShouldReportDetailedMessageForSource( | 288 virtual bool ShouldReportDetailedMessageForSource( |
| 277 const base::string16& source) const; | 289 const base::string16& source) const; |
| 278 | 290 |
| 279 // Returns true if we should gather stats during resource loads as if the | 291 // Returns true if we should gather stats during resource loads as if the |
| 280 // cross-site document blocking policy were enabled. Does not actually block | 292 // cross-site document blocking policy were enabled. Does not actually block |
| 281 // any pages. | 293 // any pages. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* | 378 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* |
| 367 index_to_traits_callback) {} | 379 index_to_traits_callback) {} |
| 368 | 380 |
| 369 // Returns true if the media pipeline can be suspended, or false otherwise. | 381 // Returns true if the media pipeline can be suspended, or false otherwise. |
| 370 virtual bool AllowMediaSuspend(); | 382 virtual bool AllowMediaSuspend(); |
| 371 }; | 383 }; |
| 372 | 384 |
| 373 } // namespace content | 385 } // namespace content |
| 374 | 386 |
| 375 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 387 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |