26 Commits

Author SHA1 Message Date
Przemyslaw Pietrzkiewicz
7de4ec3b25 Drop weak_ptr_factory in SkyDebugger.
It seems not to be used for anything.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/921633006
2015-02-13 18:24:15 +01:00
Eric Seidel
30798815f5 Rename SkyDebugger to KioskWM and move to /services
Already other applications use sky's simple window
manager (mojo:sky_debugger) as a full-screen window
manager.  This moves this to /services and removes
all sky references from it.

As a part of this I've removed inspector support
from skydb.  It was already broken and will need
to be re-thought to not involve calls into
this new window manager.

I'm also flipping the relationship between prompt.cc
and debugger.cc for skydb.  Skydb will tell mojo_shell
to start sky_debugger_prompt instead of sky_debugger.

I'm also renaming sky_debugger_prompt to be
sky_debugger.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/883983004
2015-01-29 11:25:58 -08:00
Eric Seidel
9f0f8f500c Make it possible to pass a default url to sky_debugger
sky_debugger will load the default url in every view that it's
asked to embed.  Think of the default_url as being like the
home-page in a conventional browser.

I also fixed prompt.cc to not terminate the entire mojo
environment when it can't start itself, but rather just
quit its own application.

With this patch I'm able to hack up mojo_shell to be able
to have a sensible default behavior when clicked from
the Android homescreen, but I'll land those hacks in a
separate change.

TBR=abarth@chromium.org
BUG=451620

Review URL: https://codereview.chromium.org/875183002
2015-01-26 13:19:06 -08:00
James Robinson
c0c8a41eb3 Remove [Client=] annotation from ServiceProvider
This removes the symmetrical nature of ServiceProvider and consistently
passes and uses a ServiceProvider + ServiceProvider& pair in places that
wish to bidirectionally expose services, such as the view manager.

The
view manager library now deals with InterfaceRequest<ServiceProvider>
and ServiceProviderPtr objects (i.e. c++ wrappers for handles) instead
of a concrete implementation of ServiceProvider to make it easier for
callers.

A number of places that were assuming a particular
ServiceProvider would always exist are updated to reflect the nullability
of the parameters in mojom and places that do not wish to ever look up
or provide services now pass nullptr instead of doomed pipe handles.

The JS application startup classes are reworked a bit to accomodate
exposing services on the third ConnectToApplication/AcceptConnection
parameter.

BUG=449432
R=abarth@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/858103002
2015-01-21 18:36:01 -08:00
Hans Muller
cf522e3ed8 Mojo JS Bindings: add show_image example
Add a simple example based on the window and view managers.

The skydb app can now handle apps that want to embed another view.

Corrected a problem in unique module name generation. An otherwise unique module name could be shadowed by a parameter name (service_provider in ViewManagerService Embed). Appended a "$" suffix to module names to avoid the collision.

BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/845103004
2015-01-12 16:35:35 -08:00
Adam Barth
64a7d49358 Implement <sky-input>
This CL contains a basic input element.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/831353003
2015-01-08 13:22:00 -08:00
Scott Violet
bafedfb8f6 Moves Create() off of View and onto ViewManager
This makes more sense given the ViewManager is used to create the
view.

R=ben@chromium.org

Review URL: https://codereview.chromium.org/818583002
2014-12-19 07:45:16 -08:00
Scott Violet
17d7739f7c Nukes ViewManager arg from ViewManagerDelegate::OnEmbed
It can be obtained from the supplied view, so no reason to include in
the arguments.

R=ben@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/815003002
2014-12-18 14:35:42 -08:00
James Robinson
29235bd8a2 Put code in //services/window_manager in namespace window_manager
R=sky@chromium.org

Review URL: https://codereview.chromium.org/788453002
2014-12-08 12:08:55 -08:00
James Robinson
685a549229 Move window_manager service implementation to //services
R=erg@chromium.org

Review URL: https://codereview.chromium.org/765753003
2014-12-02 10:52:00 -08:00
Adam Barth
ead67ecbbf Remove event targeting hack
Mojo's event targeting system has evolved to the point were we don't need this
ugly hack anymore.

R=ojan@chromium.org, erg@chromium.org

Review URL: https://codereview.chromium.org/762443002
2014-11-26 09:00:04 -08:00
Scott Violet
90f1388f44 Makes views be initially hidden
This better matches what other toolkits do and lets the client
configure the view before we attempt to show something for it.

BUG=434429
TEST=covered by test
R=erg@chromium.org

Review URL: https://codereview.chromium.org/745743002
2014-11-20 13:04:25 -08:00
Elliot Glaysher
13d46ddaca Dispatch key events to the currently focused window.
This fixes the browser demo. You can now enter text into the URL bar.

BUG=431047
R=sky@chromium.org

Review URL: https://codereview.chromium.org/737913002
2014-11-19 10:39:24 -08:00
Adam Barth
411a9113b8 Input events are broken in skydb
When we removed Aura from the build, we broke event targeting. This CL hacks
around the issue by blindly forwarding events from the root view to the content
view in skydb. Once we have proper event targeting, we should rip out this code.

R=erg@chromium.org

Review URL: https://codereview.chromium.org/714213003
2014-11-12 10:32:54 -08:00
Elliot Glaysher
23babae2de Reland: Remove aura and make a pure mojo::View version of FocusController.
[Changes: Remove additional deps which Linux/Windows was fine with, but
which broke android because it implied an aura dependency. window_manager
should now be properly deauraed.]

This patch is only half done, however the main driver (removing aura) is
needed by other teams for them to make progress.

Input handling is regressed in this patch; while FocusController is
rebuilt to the point where it should theoretically work, all of the
details about ui::EventTargeter don't work correctly. There is an empty
subclass ViewTargeter which will need to be filled out before

Thankfully, this should only regress people who are using the wm_flow
demo, and this should unblock the android guys who don't have aura
support on their platform.

BUG=431047
TBR=eseidel@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/710203006
2014-11-10 17:06:49 -08:00
Elliot Glaysher
cf51d90a37 Revert "Remove aura and make a pure mojo::View version of the aura::Window FocusController."
This reverts commit bb29e4293b6e60ee721b5be17f9fa9f4989a1981.

This is a speculative revert due to android waterfall bots failing.

BUG=431047
TBR=ojan@chromium.org,sky@chromium.org

Review URL: https://codereview.chromium.org/718573002
2014-11-10 16:28:49 -08:00
Elliot Glaysher
e5278621eb Remove aura and make a pure mojo::View version of the aura::Window FocusController.
This patch is only half done, however the main driver (removing aura) is needed by other teams for them to make progress.

Input handling is regressed in this patch; while FocusController is rebuilt to the point where it should theoretically work, all of the details about ui::EventTargeter don't work correctly. There is an empty subclass ViewTargeter which will need to be filled out before

Thankfully, this should only regress people who are using the wm_flow demo, and this should unblock the android guys who don't have aura support on their platform.

BUG=431047
R=eseidel@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/698543005
2014-11-10 15:42:36 -08:00
Eric Seidel
9eb275c267 Add back exit(0) until crbug.com/430581 can be resolved.
BUG=430581
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/693433005
2014-11-06 12:55:29 -08:00
Eric Seidel
2ee8874f35 Bring skydebugger closer to clean-shutdown
This teaches the SkyDebugger prompt how to tell
the sky debugger (server) to shut down instead of
just calling exit(0).

This also teaches the WindowManagerApp (server) how
to tear down all of its connections itself instead
of depending on the pipes to do so (which would
crash when youd delete the WindowManagerApp as the
pipes could outlive it with WindowManagerImpl objects
containing raw pointers back to the WindowManagerApp).

Shutdown is not yet clean.  It errors out trying to
talk to the X11 server, but it's closer to clean
than it was prior to this change.  I may add back
and exit(0) to side-step shutdown until it can be
made fully clean.

R=jamesr@chromium.org, sky@chromium.org
BUG=430291, 430242

Review URL: https://codereview.chromium.org/695183003
2014-11-05 13:09:08 -08:00
Adam Barth
9a2441ce9e Make clicking links work in SkyDB
Now the SkyDebugger implements NavigatorHost and actually navigates the
mojo::View. This CL pulled a big refactor of sky/tools/debugger to separate out
MojoMain from debugger.cc.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690363002
2014-10-31 13:17:15 -07:00
Eric Seidel
84064defab Make it possible to change the viewport size
This makes it possible to change the viewport size
which mojo is using.  The sky debugger uses this new
API to set the viewport to something closer to mobile
instead of 800x600 ancient desktop size. :)

Still the (800, 600) constant is prevelant throughout
mojo (just search for it) and mojo does not seem to
fully update when the viewport size changes, so we actually
only see 320x600 pixels instead of 320x640 in
sky debugger after this change.

Mostly this change is about validating that this is the
correct way to plumb this information.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/692693002
2014-10-30 14:20:45 -07:00
Adam Barth
74db9da5e1 Add inspect command to skydb
This CL adds an "inspect" command to skydb that injects the inspector module
into the page and prints some instructions for opening the inspector.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690433004
2014-10-28 17:08:25 -07:00
Eric Seidel
47a70575e8 Fix border parsing to work again
I accidentally broke border parsing when
removing CSS color keyword hacks.

While debugging this I also ran into a
race condition in the debugger, which
is fixed here.

Add --gdb argument to skydb

Makes it trivial to drop into gdb having launched
mojo_shell/sky with the right arguments.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/673073002
2014-10-23 16:54:21 -07:00
John Abd-El-Malek
b9e88bad01 Fix build.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/659043004
2014-10-23 14:54:07 -07:00
Eric Seidel
27769cca2c Teach tools/skydb how to take a URL as a parameter.
Turns out our shut-down code in debugger.cc is never
called.  Need to talk to Ben to figure out how
to listen for the CloseWindow.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/658113004
2014-10-23 13:40:48 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00