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

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

Issue 2943583002: [extension SW] Support lazy events from extension service workers. (Closed)
Patch Set: Address comments Created 3 years, 6 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>
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // Allows subclasses to enable some runtime features before Blink has 335 // Allows subclasses to enable some runtime features before Blink has
336 // started. 336 // started.
337 virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} 337 virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
338 338
339 // Notifies that a service worker context has been created. This function 339 // Notifies that a service worker context has been created. This function
340 // is called from the worker thread. 340 // is called from the worker thread.
341 virtual void DidInitializeServiceWorkerContextOnWorkerThread( 341 virtual void DidInitializeServiceWorkerContextOnWorkerThread(
342 v8::Local<v8::Context> context, 342 v8::Local<v8::Context> context,
343 int64_t service_worker_version_id, 343 int64_t service_worker_version_id,
344 const GURL& url) {} 344 const GURL& service_worker_scope,
345 const GURL& script_url) {}
345 346
346 // Notifies that a service worker context will be destroyed. This function 347 // Notifies that a service worker context will be destroyed. This function
347 // is called from the worker thread. 348 // is called from the worker thread.
348 virtual void WillDestroyServiceWorkerContextOnWorkerThread( 349 virtual void WillDestroyServiceWorkerContextOnWorkerThread(
349 v8::Local<v8::Context> context, 350 v8::Local<v8::Context> context,
350 int64_t service_worker_version_id, 351 int64_t service_worker_version_id,
351 const GURL& url) {} 352 const GURL& service_worker_scope,
353 const GURL& script_url) {}
352 354
353 // Whether this renderer should enforce preferences related to the WebRTC 355 // Whether this renderer should enforce preferences related to the WebRTC
354 // routing logic, i.e. allowing multiple routes and non-proxied UDP. 356 // routing logic, i.e. allowing multiple routes and non-proxied UDP.
355 virtual bool ShouldEnforceWebRTCRoutingPreferences(); 357 virtual bool ShouldEnforceWebRTCRoutingPreferences();
356 358
357 // Notifies that a worker context has been created. This function is called 359 // Notifies that a worker context has been created. This function is called
358 // from the worker thread. 360 // from the worker thread.
359 virtual void DidInitializeWorkerContextOnWorkerThread( 361 virtual void DidInitializeWorkerContextOnWorkerThread(
360 v8::Local<v8::Context> context) {} 362 v8::Local<v8::Context> context) {}
361 363
362 // Overwrites the given URL to use an HTML5 embed if possible. 364 // Overwrites the given URL to use an HTML5 embed if possible.
363 // An empty URL is returned if the URL is not overriden. 365 // An empty URL is returned if the URL is not overriden.
364 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); 366 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
365 367
366 // Provides parameters for initializing the global task scheduler. Default 368 // Provides parameters for initializing the global task scheduler. Default
367 // params are used if this returns nullptr. 369 // params are used if this returns nullptr.
368 virtual std::unique_ptr<base::TaskScheduler::InitParams> 370 virtual std::unique_ptr<base::TaskScheduler::InitParams>
369 GetTaskSchedulerInitParams(); 371 GetTaskSchedulerInitParams();
370 372
371 // Returns true if the media pipeline can be suspended, or false otherwise. 373 // Returns true if the media pipeline can be suspended, or false otherwise.
372 virtual bool AllowMediaSuspend(); 374 virtual bool AllowMediaSuspend();
373 }; 375 };
374 376
375 } // namespace content 377 } // namespace content
376 378
377 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 379 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698