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> |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 // Allows subclasses to enable some runtime features before Blink has | 340 // Allows subclasses to enable some runtime features before Blink has |
341 // started. | 341 // started. |
342 virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} | 342 virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} |
343 | 343 |
344 // Notifies that a service worker context has been created. This function | 344 // Notifies that a service worker context has been created. This function |
345 // is called from the worker thread. | 345 // is called from the worker thread. |
346 virtual void DidInitializeServiceWorkerContextOnWorkerThread( | 346 virtual void DidInitializeServiceWorkerContextOnWorkerThread( |
347 v8::Local<v8::Context> context, | 347 v8::Local<v8::Context> context, |
348 int64_t service_worker_version_id, | 348 int64_t service_worker_version_id, |
349 const GURL& url) {} | 349 const GURL& service_worker_scope, |
| 350 const GURL& script_url) {} |
350 | 351 |
351 // Notifies that a service worker context will be destroyed. This function | 352 // Notifies that a service worker context will be destroyed. This function |
352 // is called from the worker thread. | 353 // is called from the worker thread. |
353 virtual void WillDestroyServiceWorkerContextOnWorkerThread( | 354 virtual void WillDestroyServiceWorkerContextOnWorkerThread( |
354 v8::Local<v8::Context> context, | 355 v8::Local<v8::Context> context, |
355 int64_t service_worker_version_id, | 356 int64_t service_worker_version_id, |
356 const GURL& url) {} | 357 const GURL& service_worker_scope, |
| 358 const GURL& script_url) {} |
357 | 359 |
358 // Whether this renderer should enforce preferences related to the WebRTC | 360 // Whether this renderer should enforce preferences related to the WebRTC |
359 // routing logic, i.e. allowing multiple routes and non-proxied UDP. | 361 // routing logic, i.e. allowing multiple routes and non-proxied UDP. |
360 virtual bool ShouldEnforceWebRTCRoutingPreferences(); | 362 virtual bool ShouldEnforceWebRTCRoutingPreferences(); |
361 | 363 |
362 // Notifies that a worker context has been created. This function is called | 364 // Notifies that a worker context has been created. This function is called |
363 // from the worker thread. | 365 // from the worker thread. |
364 virtual void DidInitializeWorkerContextOnWorkerThread( | 366 virtual void DidInitializeWorkerContextOnWorkerThread( |
365 v8::Local<v8::Context> context) {} | 367 v8::Local<v8::Context> context) {} |
366 | 368 |
367 // Overwrites the given URL to use an HTML5 embed if possible. | 369 // Overwrites the given URL to use an HTML5 embed if possible. |
368 // An empty URL is returned if the URL is not overriden. | 370 // An empty URL is returned if the URL is not overriden. |
369 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); | 371 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); |
370 | 372 |
371 // Provides parameters for initializing the global task scheduler. Default | 373 // Provides parameters for initializing the global task scheduler. Default |
372 // params are used if this returns nullptr. | 374 // params are used if this returns nullptr. |
373 virtual std::unique_ptr<base::TaskScheduler::InitParams> | 375 virtual std::unique_ptr<base::TaskScheduler::InitParams> |
374 GetTaskSchedulerInitParams(); | 376 GetTaskSchedulerInitParams(); |
375 | 377 |
376 // 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. |
377 virtual bool AllowMediaSuspend(); | 379 virtual bool AllowMediaSuspend(); |
378 }; | 380 }; |
379 | 381 |
380 } // namespace content | 382 } // namespace content |
381 | 383 |
382 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 384 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |