summaryrefslogtreecommitdiffstats
path: root/mojo/examples
Commit message (Collapse)AuthorAgeFilesLines
* Make aurademo create a command line and atexitmanagersky@chromium.org2014-01-111-0/+4
| | | | | | | | | | | | These are generally needed by aura and other parts of the code. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/134523004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244336 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: Remove utility:: namespacedarin@chromium.org2014-01-091-3/+3
| | | | | | | | | | Public facing APIs should just live in the mojo:: namespace. R=sky@chromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/128803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243799 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dependencies on base from SampleAppdavemoore@chromium.org2014-01-085-30/+39
| | | | | | | | | | | | | - Change to use mojo::utility::RunLoop - Move timer from gles2_client_impl to gles2_impl with added api. BUG=None TEST=None R=darin Review URL: https://codereview.chromium.org/128813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243695 0039d316-1c4b-4281-b951-d872f2087c98
* Makes Window::Init take a WindowLayerType instead of LayerType.sky@chromium.org2014-01-081-3/+3
| | | | | | | | | | BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/121773003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243656 0039d316-1c4b-4281-b951-d872f2087c98
* Rename RootWindowHost to WindowTreeHostben@chromium.org2014-01-085-44/+44
| | | | | | | | | TBR=sky@chromium.org http://crbug.com/308843 Review URL: https://codereview.chromium.org/126513004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243578 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: abstract interface implementation from generated Stub classesdarin@chromium.org2014-01-079-27/+18
| | | | | | | | | | Remove RemotePtr<S>::SetPeer method in favor of an optionally NULL second constructor argument. (The reset method also gains an optionally NULL second argument.) R=davemoore@chromium.org Review URL: https://codereview.chromium.org/109103003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243416 0039d316-1c4b-4281-b951-d872f2087c98
* Run aura_demo as a mojo app.ben@chromium.org2014-01-079-0/+801
| | | | | | | | | | http://crbug.com/330416 R=sky@chromium.org Review URL: https://codereview.chromium.org/120503003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243393 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: Remove unused hello_world_service codedarin@chromium.org2014-01-073-71/+0
| | | | | | Review URL: https://codereview.chromium.org/125773002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243364 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: Add MessagePipe to core_cpp.h for conveniencedarin@chromium.org2013-12-251-9/+7
| | | | | | Review URL: https://codereview.chromium.org/119563003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242484 0039d316-1c4b-4281-b951-d872f2087c98
* Sample mojo app using the compositorjamesr@chromium.org2013-12-216-0/+406
| | | | | | | | | | This shows how to use cc from a mojo app. The GLES2 bindings are very sketchy since we don't yet have an implementation of the command buffer support on top of mojo pipes, but the rest is fairly reasonable. Review URL: https://codereview.chromium.org/108853007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242261 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ServiceManagerdavemoore@chromium.org2013-12-183-101/+66
| | | | | | | | | BUG=None R=abarth@chromium.org, abarth Review URL: https://codereview.chromium.org/93793009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241446 0039d316-1c4b-4281-b951-d872f2087c98
* Do something more interesting than printf when an event is received by ↵ben@chromium.org2013-12-116-22/+128
| | | | | | | | | | | | | sample_app. R=abarth@chromium.org http://crbug.com/324639 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239910 Review URL: https://codereview.chromium.org/108273008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 239910 "Do something more interesting than printf when an..."vadimt@chromium.org2013-12-106-127/+22
| | | | | | | | | | | | | | | > Do something more interesting than printf when an event is received by sample_app. > > R=abarth@chromium.org > http://crbug.com/324639 > > Review URL: https://codereview.chromium.org/108273008 TBR=ben@chromium.org Review URL: https://codereview.chromium.org/98303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239918 0039d316-1c4b-4281-b951-d872f2087c98
* Do something more interesting than printf when an event is received by ↵ben@chromium.org2013-12-106-22/+127
| | | | | | | | | | | sample_app. R=abarth@chromium.org http://crbug.com/324639 Review URL: https://codereview.chromium.org/108273008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239910 0039d316-1c4b-4281-b951-d872f2087c98
* Move us closer to shutting down cleanly.ben@chromium.org2013-12-092-4/+10
| | | | | | | | | | | | | This adds a Destroy() method to NativeViewportClient that the NVS can use to notify the app of NV destruction. The app should then halt its message loop and exit. Note that we still crash on shutdown due to scheduled tasks continuing to want to touch the AcceleratedWidget post-destruction. We need to devise a better mechanism for this (see comment) R=abarth@chromium.org http://crbug.com/325901 Review URL: https://codereview.chromium.org/108193003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239542 0039d316-1c4b-4281-b951-d872f2087c98
* Wire events through to sample_appben@chromium.org2013-12-062-0/+10
| | | | | | | | | R=abarth@chromium.org http://crbug.com/324639 Review URL: https://codereview.chromium.org/100823010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239233 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: Generate bindings that make use of ScopedMessagePipeHandle.darin@chromium.org2013-12-041-1/+1
| | | | | | | | R=abarth@chromium.org, davemoore@google.com, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/97713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238592 0039d316-1c4b-4281-b951-d872f2087c98
* [Mojo] Remove dependency between mojo/public and gpuabarth@chromium.org2013-12-048-94/+98
| | | | | | | | | | | | | | | | | | | | | | | This CL restructures how sample_app integrates with the GPU command buffer. Instead of mojo/public containing code that depends directly on gpu/command_buffer, this CL isolates that dependency into a dynamically linked library modelled after mojo_system. 1) mojo/public/gles2 contains a simple C API to libmojo_gles2.so. 2) mojo/gles2 contains a "thin" implementation of this API in terms of gpu/command_buffer. 3) Instead of subclassing GLES2ClientStub in mojo/public/bindings, we now subclass the stub directly in sample_app and control the GLES2 C API via mojo/public/gles2. I've also added a couple of README.md files that describe the purposes of the various directories and the reasons why the code is structured in this way. R=darin@chromium.org Review URL: https://codereview.chromium.org/101413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238517 0039d316-1c4b-4281-b951-d872f2087c98
* [Mojo] Fix race condition in sample_app's SwapBuffersabarth@chromium.org2013-12-023-6/+7
| | | | | | | | | | | | The in-process command buffer expects all of its callers to be on a single thread. Prior to this CL, we were bouncing back to the shell thread to call swap buffers. Now we call SwapBuffers from sample_app's thread. R=davemoore@chromium.org Review URL: https://codereview.chromium.org/99323005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238223 0039d316-1c4b-4281-b951-d872f2087c98
* [Mojo] sample_app should draw a spinning cubeabarth@chromium.org2013-12-014-82/+100
| | | | | | | | | After this CL, sample_app draws a spinning cube. We're still driving the animation off a timer rather than off vsync, but we're making progress. :) Review URL: https://codereview.chromium.org/95653002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237994 0039d316-1c4b-4281-b951-d872f2087c98
* [Mojo] Introduce gles2 serviceabarth@chromium.org2013-11-287-33/+88
| | | | | | | | | | | | | | | This CL introduces a Mojo service for GLES2 and uses that service to better structure the sample_app's use of GL. The implementation of the service lives in mojo/services/gles2 and currently creates an in-process command buffer. The implementation of the client lives in public/bindings/gles2_client, which wires up the command buffer to gles2_c_lib. When using public/bindings/gles2_client, Mojo applications can now use GL via the normal C API. BUG=none Review URL: https://codereview.chromium.org/93163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237756 0039d316-1c4b-4281-b951-d872f2087c98
* [Mojo] Draw GL from within sample_appabarth@chromium.org2013-11-285-71/+81
| | | | | | | | | | | | | | This CL replaces hello_world_service with native_viewport in mojo_shell and sample_app. After this CL, we're able to draw GL from within sample_app. However, we're still using a bit of a hack to transfer the GL interface to the sample_app. R=aa@chromium.org BUG=none Review URL: https://codereview.chromium.org/92643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237659 0039d316-1c4b-4281-b951-d872f2087c98
* Use ScopedMessagePipeHande in Connector.davemoore@chromium.org2013-11-275-9/+11
| | | | | | | | | | | | This is the first step in moving the bindings entirely to ScopedMessagePipeHandle BUG=None R=viettrungluu@chromium.org, viettrungluu Review URL: https://codereview.chromium.org/89003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237577 0039d316-1c4b-4281-b951-d872f2087c98
* PIMPL-style wrappers for generated bindings.darin@chromium.org2013-11-263-4/+4
| | | | | | | | | | | | | | | | | | | | This CL pushes the existing structs and Array<T> into the background. They get renamed with a "_Data" suffix, and the generated structs and Array<T> become a class holding just a data pointer. To prevent accidental mutation of a received struct/array, there are two kinds of wrappers: Foo and Foo::Builder. Foo is readonly. Use Foo::Builder to construct a Foo. Given https://codereview.chromium.org/82913002/, it'll be possible to make the Buffer* parameters optional. That will open up the opportunity to pass |std::string| in place of |mojo::String| :-) R=davemoore@chromium.org Review URL: https://codereview.chromium.org/82653008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237269 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: Improved C++ wrappers.viettrungluu@chromium.org2013-11-215-14/+14
| | | | | | | | | | | | | | | | | | | | | | | These build in some stronger static typing and try to help with lifetime management. They remain true to the C API (using functions instead of methods), to be consistent and avoid awkwardness between the Handle objects and their scoped versions (e.g., if we put methods on MessagePipeHandle, it'd be awkward to access them from the scoped version). Also, they are written with code generators in mind. As such, currently I only provide WriteMessageRaw()/ReadMessageRaw() that a) provide full access to the C API, and b) don't help with lifetime management (but also don't impose any further efficiency issues either). I'd consider adding non-raw versions, but the intention is that most people would use generated proxy code (which may take, e.g., MessagePipeHandle or ScopedMessagePipeHandle arguments). R=abarth@chromium.org, darin@chromium.org Review URL: https://codereview.chromium.org/71613005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236357 0039d316-1c4b-4281-b951-d872f2087c98
* Work in progress for end-to-end bindingsdavemoore@chromium.org2013-11-156-48/+157
| | | | | | | | | | R=darin@chromium.org, sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234975 Review URL: https://codereview.chromium.org/72123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235379 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 234975 "Work in progress for end-to-end bindings"mmenke@chromium.org2013-11-146-158/+46
| | | | | | | | | | | | | | | | This apparently broke the win and mac debug trybots. > Work in progress for end-to-end bindings > > R=darin@chromium.org > > Review URL: https://codereview.chromium.org/72123002 TBR=davemoore@chromium.org Review URL: https://codereview.chromium.org/62103015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235034 0039d316-1c4b-4281-b951-d872f2087c98
* Work in progress for end-to-end bindingsdavemoore@chromium.org2013-11-146-46/+158
| | | | | | | | R=darin@chromium.org Review URL: https://codereview.chromium.org/72123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234975 0039d316-1c4b-4281-b951-d872f2087c98
* Add a SpinningCube to Mojo's sample_appabarth@chromium.org2013-11-063-0/+479
| | | | | | | | | | | | | We don't actually call this code yet, but we're going to need this code in order to demo a spinning cube. I've verified that this code draws a cube when called directly from mojo_shell. It should work when called from sample_app once we figure out how we want to expose GL to Mojo apps. R=jamesr@chromium.org Review URL: https://codereview.chromium.org/61423003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233309 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up GL Command buffer on Windows tooben@chromium.org2013-11-061-2/+1
| | | | | | | | | BUG= R=abarth@chromium.org Review URL: https://codereview.chromium.org/59513005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233235 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the skeleton of a NativeViewport concept.ben@chromium.org2013-10-311-8/+11
| | | | | | | | | | | | | This is a platform-specific View (output surface and event sink). We listen for events and other disposition changes and forward them to app code. In this case I just do something ad-hoc (stringify some event metadata and post to our existing sample app). Once we have bindings, we can surface a better API here. I would also like for the app to request the NativeViewportService from the Service Service, and get a separate pipe for that, rather than reusing the one that is passed through MojoMain (which I think is supposed to only be for surfacing the ServiceService). Anyway WDYT? If we agree on this I can figure out how to wrap the org.chromium.mojo_shell_apk.MojoView in a NativeViewport. BUG= R=abarth@chromium.org Review URL: https://codereview.chromium.org/51373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232210 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup mojo_shell and sample_app a bitabarth@chromium.org2013-10-281-0/+73
This CL contains a number of cleanups now that the structure of mojo_shell is clearer. Specifically, 1) I've moved sample_app.cc from mojo/shell to mojo/examples/sample_app. The sample_app isn't part of the mojo_shell. It's an example app that runs on top of the shell. 2) I've merged mojo/loader into mojo/shell. Originally, I thought it would be better to keep the loader separate, but we had to introduce a direct dependency from mojo/shell to net anyway, so we might as well merge these two directories. We'll probably pull them apart again when we can make the loader into a Mojo service. As part of this cleanup, I've also removed the Job/JobImpl split because that existed only to avoid leaking net headers. This ended up simplifying the code a bit. 3) I've renamed mojo/shell/android/shell_apk to mojo/shell/android/apk to remove some of the stutter from the directory name. 4) Finally, I've added a Quit task to run.cc in the error case so that we exit the main loop when we hit this error instead of spinning forever. This change is the only behavior change in this CL. R=darin@chromium.org Review URL: https://codereview.chromium.org/47433002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231287 0039d316-1c4b-4281-b951-d872f2087c98