summaryrefslogtreecommitdiffstats
path: root/content/renderer/mojo/service_registry_js_wrapper.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make the process-wide ServiceRegistry available to JS.sammc2016-03-241-4/+5
| | | | | | | | BUG=597465 Review URL: https://codereview.chromium.org/1827473002 Cr-Commit-Position: refs/heads/master@{#383008}
* Clear overridden services when a mojo layout test ends.sammc2016-02-221-5/+16
| | | | | | | | | | | | Now that service factory overrides can be called more than once, they need to be cleaned up to avoid being detected as leaks in layout tests. This adds a ClearServiceOverridesForTesting() to ServiceRegistryImpl and ServiceRegistryJsWrapper and adds a call at the end of a mojo_test layout test. Review URL: https://codereview.chromium.org/1716113002 Cr-Commit-Position: refs/heads/master@{#376858}
* Fix some issues with ServiceRegistryJsWrapper service overrides.sammc2016-02-211-29/+37
| | | | | | | | | | | | | | | | | | | Currently, ServiceRegistryJsWrapper calls service override factories without creating V8 scopes; this allows it to work when the factory is called synchronously as the result of some JavaScript execution, but fail otherwise. This adds the appropriate V8 scopes when calling the factory function; it also uses WebFrame::callFunctionEvenIfScriptDisabled() as as WebScopedMicrotaskSuppression.h suggests. Additionally, the service override factories are only usable once. This changes them to be copyable persistents so they can be reused; this also happens to make them clean themselves up without an explicit Reset() call. Review URL: https://codereview.chromium.org/1702513002 Cr-Commit-Position: refs/heads/master@{#376672}
* [mojo] Delete third_party/mojorockot2016-02-101-1/+1
| | | | | | | | | | | All users are on the new EDK now. This wipes out third_party/mojo, updates all dependencies, and removes the use-new-edk flag. BUG=None Review URL: https://codereview.chromium.org/1676913002 Cr-Commit-Position: refs/heads/master@{#374631}
* [mojo] Reland: ServiceRegistry overridesrockot2016-01-311-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | This adds a new AddServiceOverride method to ServiceRegistryImpl. The purpose of this is to allow testing code to intercept remote service connections and opaquely provide a mock implementation of any service. The new interface is also added to the ServiceRegistry's JS bindings. NOTE: The original CL was reverted due to LayoutTest leaks caused by mismanagement of JS factory function handles. This CL fixes the leaks by properly resetting said handles when tearing down the ServiceRegistry. Original CL: https://codereview.chromium.org/1470153002 TBR=jam@chromium.org,reillyg@chromium.org BUG= Review URL: https://codereview.chromium.org/1657453002 Cr-Commit-Position: refs/heads/master@{#372575}
* Revert of [mojo] Enable ServiceRegistryImpl to override remote services ↵noel2016-01-281-32/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #12 id:220001 of https://codereview.chromium.org/1470153002/ ) Reason for revert: Causing Oilpan leak bot failure https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/builds/17113 Original issue's description: > [mojo] Enable ServiceRegistryImpl to override remote services > > This adds a new AddServiceOverride method to ServiceRegistryImpl. > The purpose of this is to allow testing code to intercept remote > service connections and opaquely provide a mock implementation of > any service. > > The new interface is also added to the ServiceRegistry's JS > bindings. > > Committed: https://crrev.com/9b0d7173af550086d5688137752a6f70109e9c98 > Cr-Commit-Position: refs/heads/master@{#371736} TBR=jam@chromium.org,reillyg@chromium.org,rockot@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. Review URL: https://codereview.chromium.org/1639233004 Cr-Commit-Position: refs/heads/master@{#372061}
* [mojo] Enable ServiceRegistryImpl to override remote servicesrockot2016-01-271-1/+32
| | | | | | | | | | | | | | This adds a new AddServiceOverride method to ServiceRegistryImpl. The purpose of this is to allow testing code to intercept remote service connections and opaquely provide a mock implementation of any service. The new interface is also added to the ServiceRegistry's JS bindings. Review URL: https://codereview.chromium.org/1470153002 Cr-Commit-Position: refs/heads/master@{#371736}
* Convert Pass()→std::move() in //content/rendererdcheng2015-12-261-1/+3
| | | | | | | | | BUG=557422 R=avi@chromium.org Review URL: https://codereview.chromium.org/1543423003 Cr-Commit-Position: refs/heads/master@{#366896}
* Revert "Share a single ServiceRegistry for all render frames in a process."rockot2015-12-161-5/+6
| | | | | | | | | | | | | | | | This reverts commit ac2a36e6cdb4739bcba077ac90950831c49b3e15. We can go back to using a per-frame ServiceRegistry because MessagePipes are cheaper now. [+ drive-by formatting of content/common/BUILD.gn] BUG=557909 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1530333002 Cr-Commit-Position: refs/heads/master@{#365638}
* Share a single ServiceRegistry for all render frames in a process.rockot2015-11-201-6/+5
| | | | | | | | | | | | | | | | | This changes ServiceRegistryImpl to implement a new content::RoutedServiceProvider mojom interface which supports normal ConnectToService as well as a ConnectToServiceRouted operation which takes a route ID for additional context. The new ConnectToServiceRouted API is then used to share ChildThreadImpl/RenderProcessHost's ServiceRegistry with each RenderFrameImpl/RenderFrameHostImpl for that process. BUG=557909 Review URL: https://codereview.chromium.org/1460803003 Cr-Commit-Position: refs/heads/master@{#360857}
* Include Mojo SDK/EDK via fully-qualified paths in Chromium code.blundell2015-01-231-1/+1
| | | | | | | | | | | | As a followup to the move of the Mojo SDK and EDK to live under //third_party, this CL updates Chromium code to include SDK/EDK headers via fully-qualified paths instead of relying on include_dirs that are exported by the Mojo targets. This CL also includes mechanical updates to DEPS files to satisfy checkdeps. Review URL: https://codereview.chromium.org/846443006 Cr-Commit-Position: refs/heads/master@{#312858}
* Update mojo sdk to rev 04a510fb37db10642e156957f9b2c11c2f6442acjamesr2014-11-071-1/+1
| | | | | | | | | | | | | | | This updates the mojo sdk and updates chromium code to match. The most significant change is updating references to the mojo JS bindings code, which reshuffled. This part was reviewed separately by hansmuller@ in https://codereview.chromium.org/693343003/. This also updates ipc/mojo to reflect changes in ChannelInfo. R=morrita@chromium.org for ipc/mojo R=jam@chromium.org for top-level approval of the rest Review URL: https://codereview.chromium.org/703273002 Cr-Commit-Position: refs/heads/master@{#303149}
* Add a Javascript wrapper around ServiceRegistry and expose it to WebUI.sammc@chromium.org2014-07-301-0/+52
This enables moving browser connection setup into each individual WebUI page implementation and thus allows each WebUI Mojo service to be registered with the ServiceRegsitry using its individual service name instead of a shared WebUI controller service name. Review URL: https://codereview.chromium.org/302573002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286459 0039d316-1c4b-4281-b951-d872f2087c98