summaryrefslogtreecommitdiffstats
path: root/content/renderer/background_sync
Commit message (Collapse)AuthorAgeFilesLines
* Add mojom module suffix in .mojom files in content.leon.han2016-03-222-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 'module content;' --> 'module content.mojom;' This way generated bindings will consistently live in a mojom sub-namespace and avoid collision with non-mojom types. This CL is for these .mojom files: content/common/application_setup.mojom content/common/background_sync_service.mojom content/common/geolocation_service.mojom content/common/process_control.mojom content/common/render_frame_setup.mojom content/common/service_port_service.mojom content/common/service_worker/embedded_worker_setup.mojom content/public/common/background_sync.mojom content/public/common/mojo_geoposition.mojom content/public/common/service_worker_event_status.mojom BUG=588964 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1758233002 Cr-Commit-Position: refs/heads/master@{#382512}
* [BackgroundSync] Remove BackgroundSyncRegistrationHandlejkarlin2016-03-152-55/+4
| | | | | | | | | | Since "registration.done" is no longer part of the spec, the BackgroundSyncManager no longer needs to refcount its registrations. This CL removes the internal reference counting and the handles that were provided to clients. BUG=583328 Review URL: https://codereview.chromium.org/1763123002 Cr-Commit-Position: refs/heads/master@{#381303}
* Change mojo enums to be scoped enums in the generated C++ bindings.sammc2016-01-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Some mojo enums were previously not proper enums: they were constants for bitfields. These have been replaced by const int32s in the mojoms: - mus.mojom.EventFlags - mus.mojom.MouseEventFlags - mus.mojom.ResizeBehavior - mus.mojom.WindowTree.AccessPolicy Some mojo enum values now conflict with macros (mostly on Windows) and needed to change: - mus.mojom.Cursor.NULL became CURSOR_NULL (again) - mus.mojom.KeyboardCode.DELETE became DELETE_KEY - mus.mojom.WindowManagerErrorCode.ERROR_ACCESS_DENIED became ACCESS_DENIED - device.usb.TransferDirection.IN became INBOUND - device.usb.TransferDirection.OUT became OUTBOUND - device.usb.TransferStatus.ERROR became TRANSFER_ERROR - device.NFCRecordType.OPAQUE became OPAQUE_RECORD - media.interfaces.Decryptor.Status.ERROR became DECRYPTION_ERROR - skia.AlphaType.OPAQUE became ALPHA_TYPE_OPAQUE Review URL: https://codereview.chromium.org/1527183003 Cr-Commit-Position: refs/heads/master@{#370632}
* Make `content` target build without unused data members on Linux.mlamouri2016-01-142-11/+3
| | | | | | | | | | | This allows the `content` target to build with the following CL applied: https://codereview.chromium.org/1222403002 BUG=447445 Review URL: https://codereview.chromium.org/1575763002 Cr-Commit-Position: refs/heads/master@{#369564}
* Convert Pass()→std::move() in //content/rendererdcheng2015-12-261-2/+5
| | | | | | | | | BUG=557422 R=avi@chromium.org Review URL: https://codereview.chromium.org/1543423003 Cr-Commit-Position: refs/heads/master@{#366896}
* Switch to standard integer types in content/renderer/.avi2015-12-252-2/+4
| | | | | | | | | BUG=138542 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1547073003 Cr-Commit-Position: refs/heads/master@{#366847}
* Move third_party/mojo/src/mojo/public to mojo/publicrockot2015-11-131-1/+1
| | | | | | | | | BUG=None NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1410053006 Cr-Commit-Position: refs/heads/master@{#359461}
* [Background Sync] Add lastChance boolean to SyncEventiclelland2015-11-092-8/+20
| | | | | | | | | | | This is currently hard-coded to true, and will be, until events are retried by the Background Sync Manager. BUG=545589 Review URL: https://codereview.chromium.org/1420923002 Cr-Commit-Position: refs/heads/master@{#358591}
* Add iclelland to BackgroundSync ownersiclelland2015-10-231-0/+1
| | | | | | | | BUG=n/a Review URL: https://codereview.chromium.org/1417013003 Cr-Commit-Position: refs/heads/master@{#355795}
* [BackgroundSync] Abort the sync event if the renderer is shutting down.jkarlin2015-10-201-1/+8
| | | | | | | | BUG=543898 Review URL: https://codereview.chromium.org/1411273002 Cr-Commit-Position: refs/heads/master@{#355056}
* Use mojo to connect to BackgroundSyncManager objectchasej2015-10-201-4/+3
| | | | | | | | | | | | | | Removes the BackgroundSyncProviderThreadProxy class, and the manual hopping from workers to the main thread. The proxy class was passing WebStrings across threads, which aren't thread-safe. With mojo connections, it lets mojo handle the thread hopping more efficiently, and the mojo structs passed are thread-safe. Tested using https://jakearchibald.github.io/isserviceworkerready/demos/sync/, as well as new browser tests. BUG=527601 Review URL: https://codereview.chromium.org/1358063004 Cr-Commit-Position: refs/heads/master@{#354963}
* Revert "Add more tracking detail to Mojo async waits."rockot2015-10-121-1/+1
| | | | | | | | | | | | | | | This reverts commit de281b568ad8d0249d6edd3040122e56c3b62dfe. Original CL: https://codereview.chromium.org/1376593005/ Messy debug info no longer necessary. BUG=534719 TBR=sky@chromium.org,jam@chromium.org Review URL: https://codereview.chromium.org/1398323002 Cr-Commit-Position: refs/heads/master@{#353483}
* Add more tracking detail to Mojo async waits.rockot2015-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | Should help debug http://crbug.com/534719 by annotating wait IDs coming from Connector with additional information so they can be associated with specific bindings objects in the child process. This should be reverted along with r350917 once more information is collected. BUG=534719 R=sky@chromium.org TBR=bengr@chromium.org for dom_distiller TBR=jam@chromium.org for content, ipc Review URL: https://codereview.chromium.org/1376593005 Cr-Commit-Position: refs/heads/master@{#352485}
* [BackgroundSync] Clean up registration id and handle typejkarlin2015-09-292-2/+2
| | | | | | | | | | Registration ids and handle ids should be int64_t. BUG=535599 Review URL: https://codereview.chromium.org/1366933002 Cr-Commit-Position: refs/heads/master@{#351300}
* Fix a use of the non-thread-safe mojo::Callback.amistry2015-09-242-6/+20
| | | | | | | | | | | | | | | | | | | | mojo::Callback is not thread-safe. It must be created, copied, and destroyed on the same thread. It is not safe to post a task to another task runner which has a mojo::Callback as a bound parameter. Because of this, a level of indirection is necessary to ensure a mojo::Callback is always used on its original thread. For BackgroundSyncClientImpl, a map is used to save the callback to the Sync method and associate that callback to an id. That id is then safe to be passed around between threads. BUG=532058 TESTED=Locally augmented mojo::internal::SharedData with a ThreadChecker to ensure mojo::Callbacks are only referenced on a single thread. Review URL: https://codereview.chromium.org/1363533002 Cr-Commit-Position: refs/heads/master@{#350400}
* For the upcoming "registration.done" feature the BackgroundSyncManager's ↵jkarlin2015-09-112-8/+49
| | | | | | | | | | | | | | | | | | | | | | | | clients will want to know about the state of registrations even after the BackgroundSyncManager has finished firing them. To prepare for that, this CL does the following: 1) BackgroundSyncManager now internally reference counts each registration it exposes to the client via RefCountedRegistration so that the client can reference a completed registration 2) BackgroundSyncManager returns BackgroundSyncRegistrationHandle to clients, which call BackgroundSyncManager::ReleaseRegistrationHandle when deleted (ensuring that all client-exposed registrations are released). 3) BackgroundSyncServiceImpl holds onto Client registrations until the renderer has signaled that it is done with them. 4) Moved Unregister to the new BackgroundSyncRegistrationHandle class (a la the javascript API). This makes it clear when it's safe for the client to delete its ClientBackgroundSyncRegisration (when it no longer needs to call unregister). 5) Added a few tests, and removed redundant sync browser tests from the service_workerbrowser_tests that are now covered in background_sync_browsertests.cc Patch 1 [Blink]: https://codereview.chromium.org/1279323002/ Patch 2 [Browser]: this Patch 3 [Blink cleanup]: https://codereview.chromium.org/1285653002/ BUG=502214 Review URL: https://codereview.chromium.org/1282013004 Cr-Commit-Position: refs/heads/master@{#348303}
* [Background Sync] Sent sync registration details to workericlelland2015-07-221-1/+5
| | | | | | | | | | | | | | | | This sends the details of a fired sync event from the BackgroundSyncManager down to the running service worker. This is part 2 of a three-part blink-chromium-blink dance: Part 1: https://codereview.chromium.org/1220223003/ Part 2: [This one] Part 3: https://codereview.chromium.org/1231743004/ BUG=482066 Review URL: https://codereview.chromium.org/1230213004 Cr-Commit-Position: refs/heads/master@{#339882}
* [Background Sync] Use Mojo IPC to fire background sync eventsiclelland2015-07-224-0/+87
This patch adds a background sync client service to the renderer process, which accepts connections from the browser, in order to trigger Sync and PeriodicSync events in the service worker. At the browser level, the Sync and PeriodicSync events are identical, so all of the code in this patch deals only with generic "Sync" events. (The code paths are the same, and the registration structs differ only in the periodicity value.) They only diverge in the renderer, once we determine which event in the service worker script proxy to fire. BUG=498388 Review URL: https://codereview.chromium.org/1220943003 Cr-Commit-Position: refs/heads/master@{#339874}