Commit 0f18be91 authored by jamesr's avatar jamesr Committed by Commit bot

Update mojo sdk to rev cfc99316100efdfa7d53d83f9e07f1d4d3765c21

Most changes are updates to the mojom syntax for modules.

R=viettrungluu@chromium.org
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/698883005

Cr-Commit-Position: refs/heads/master@{#302542}
parent 174ab92a
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "content/public/common/mojo_geoposition.mojom"; module content;
module content { import "content/public/common/mojo_geoposition.mojom";
// The Geolocation service provides updates on the device's location to its // The Geolocation service provides updates on the device's location to its
// client. By default, it provides updates with low accuracy, but // client. By default, it provides updates with low accuracy, but
...@@ -17,5 +17,3 @@ interface GeolocationService { ...@@ -17,5 +17,3 @@ interface GeolocationService {
interface GeolocationServiceClient { interface GeolocationServiceClient {
OnLocationUpdate(MojoGeoposition geoposition); OnLocationUpdate(MojoGeoposition geoposition);
}; };
}
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/public/interfaces/application/service_provider.mojom"; module content;
module content { import "mojo/public/interfaces/application/service_provider.mojom";
interface RenderFrameSetup { interface RenderFrameSetup {
GetServiceProviderForFrame(int32 frame_routing_id, GetServiceProviderForFrame(int32 frame_routing_id,
mojo.ServiceProvider& service_provider); mojo.ServiceProvider& service_provider);
}; };
}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// TODO(blundell): Investigate killing content::Geoposition in favor of using // TODO(blundell): Investigate killing content::Geoposition in favor of using
// this struct everywhere (and renaming it to Geoposition). // this struct everywhere (and renaming it to Geoposition).
module content { module content;
struct MojoGeoposition { struct MojoGeoposition {
// These values follow the W3C geolocation specification and can be returned // These values follow the W3C geolocation specification and can be returned
...@@ -54,5 +54,3 @@ struct MojoGeoposition { ...@@ -54,5 +54,3 @@ struct MojoGeoposition {
// Human-readable error message. // Human-readable error message.
string error_message; string error_message;
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module content { module content;
[Client=RendererTarget] [Client=RendererTarget]
interface BrowserTarget { interface BrowserTarget {
...@@ -12,5 +12,3 @@ interface BrowserTarget { ...@@ -12,5 +12,3 @@ interface BrowserTarget {
interface RendererTarget { interface RendererTarget {
Ping(); Ping();
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "device/battery/battery_status.mojom"; module device;
module device { import "device/battery/battery_status.mojom";
// A BatteryMonitor will periodically call its client's DidChange method. // A BatteryMonitor will periodically call its client's DidChange method.
[Client=BatteryStatusObserver] [Client=BatteryStatusObserver]
...@@ -14,5 +14,3 @@ interface BatteryMonitor { ...@@ -14,5 +14,3 @@ interface BatteryMonitor {
interface BatteryStatusObserver { interface BatteryStatusObserver {
DidChange(BatteryStatus status); DidChange(BatteryStatus status);
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module device { module device;
struct BatteryStatus { struct BatteryStatus {
bool charging = true; bool charging = true;
...@@ -10,5 +10,3 @@ struct BatteryStatus { ...@@ -10,5 +10,3 @@ struct BatteryStatus {
double discharging_time = double.INFINITY; double discharging_time = double.INFINITY;
double level = 1.0; double level = 1.0;
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module device.serial { module device.serial;
[Client=DataSourceClient] [Client=DataSourceClient]
interface DataSource { interface DataSource {
...@@ -51,5 +51,3 @@ interface DataSinkClient { ...@@ -51,5 +51,3 @@ interface DataSinkClient {
// when it is ready to resume sending data. // when it is ready to resume sending data.
ReportBytesSentAndError(uint32 bytes_sent, int32 error) => (); ReportBytesSentAndError(uint32 bytes_sent, int32 error) => ();
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "data_stream.mojom"; module device.serial;
module device.serial { import "data_stream.mojom";
// A serialized form of a DataSender. // A serialized form of a DataSender.
struct SerializedDataSender { struct SerializedDataSender {
...@@ -48,5 +48,3 @@ struct SerializedDataReceiver { ...@@ -48,5 +48,3 @@ struct SerializedDataReceiver {
array<array<uint8>> pending_data; array<array<uint8>> pending_data;
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "data_stream.mojom"; module device.serial;
module device.serial { import "data_stream.mojom";
struct DeviceInfo { struct DeviceInfo {
string path; string path;
...@@ -104,5 +104,3 @@ interface Connection { ...@@ -104,5 +104,3 @@ interface Connection {
GetControlSignals() => (DeviceControlSignals? signals); GetControlSignals() => (DeviceControlSignals? signals);
Flush() => (bool success); Flush() => (bool success);
}; };
}
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module device.serial;
import "serial.mojom"; import "serial.mojom";
import "data_stream_serialization.mojom"; import "data_stream_serialization.mojom";
module device.serial {
// The client state of a serial connection. // The client state of a serial connection.
struct ConnectionState { struct ConnectionState {
uint32 connectionId; uint32 connectionId;
...@@ -27,5 +27,3 @@ struct SerializedConnection { ...@@ -27,5 +27,3 @@ struct SerializedConnection {
SerializedDataSender sender; SerializedDataSender sender;
SerializedDataReceiver receiver; SerializedDataReceiver receiver;
}; };
}
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module extensions { module extensions;
// An RAII service for keep alives. While KeepAlive services for an extension // An RAII service for keep alives. While KeepAlive services for an extension
// remain, the background page for that extension will remain alive. // remain, the background page for that extension will remain alive.
interface KeepAlive { interface KeepAlive {
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module extensions { module extensions;
// A stashed client object. This contains the serialized bytes and handles, // A stashed client object. This contains the serialized bytes and handles,
// stored in |data| and |handles|, respectively, of a mojo struct of the // stored in |data| and |handles|, respectively, of a mojo struct of the
...@@ -28,5 +28,3 @@ interface StashService { ...@@ -28,5 +28,3 @@ interface StashService {
// Returns all stashed objects. // Returns all stashed objects.
RetrieveStash() => (array<StashedObject> stash); RetrieveStash() => (array<StashedObject> stash);
}; };
}
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module IPC { module IPC;
interface ClientChannel { interface ClientChannel {
Init(handle<message_pipe> pipe, int32 peer_pid) => (int32 pid); Init(handle<message_pipe> pipe, int32 peer_pid) => (int32 pid);
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "media/mojo/interfaces/media_types.mojom"; module mojo;
module mojo { import "media/mojo/interfaces/media_types.mojom";
// DemuxerStream is modeled after media::DemuxerStream using mojo in order to // DemuxerStream is modeled after media::DemuxerStream using mojo in order to
// enable proxying between a media::Pipeline and media::Renderer living in two // enable proxying between a media::Pipeline and media::Renderer living in two
...@@ -50,5 +50,3 @@ interface DemuxerStreamClient { ...@@ -50,5 +50,3 @@ interface DemuxerStreamClient {
// in a Read() callback or over the DataPipe). // in a Read() callback or over the DataPipe).
OnAudioDecoderConfigChanged(AudioDecoderConfig config); OnAudioDecoderConfigChanged(AudioDecoderConfig config);
}; };
} // module mojo
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "media/mojo/interfaces/demuxer_stream.mojom"; import "media/mojo/interfaces/demuxer_stream.mojom";
import "media/mojo/interfaces/media_types.mojom"; import "media/mojo/interfaces/media_types.mojom";
module mojo {
[Client=MediaRendererClient] [Client=MediaRendererClient]
interface MediaRenderer { interface MediaRenderer {
// Initializes the Renderer with |stream|, calling back upon completion. // Initializes the Renderer with |stream|, calling back upon completion.
...@@ -49,5 +49,3 @@ interface MediaRendererClient { ...@@ -49,5 +49,3 @@ interface MediaRendererClient {
// OnError() will be called before firing the completion callback. // OnError() will be called before firing the completion callback.
OnError(); OnError();
}; };
} // module mojo
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
// See media/base/buffering_state.h for descriptions. // See media/base/buffering_state.h for descriptions.
// Kept in sync with media::BufferingState via COMPILE_ASSERTs. // Kept in sync with media::BufferingState via COMPILE_ASSERTs.
...@@ -123,5 +123,3 @@ struct MediaDecoderBuffer { ...@@ -123,5 +123,3 @@ struct MediaDecoderBuffer {
// for now for prototyping audio. // for now for prototyping audio.
handle<data_pipe_consumer>? data; handle<data_pipe_consumer>? data;
}; };
} // module mojo
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
[Client=TestClient] [Client=TestClient]
interface TestService { interface TestService {
...@@ -26,5 +26,3 @@ interface TestB { ...@@ -26,5 +26,3 @@ interface TestB {
interface TestC { interface TestC {
C() => (); C() => ();
}; };
}
...@@ -13,7 +13,7 @@ group("public") { ...@@ -13,7 +13,7 @@ group("public") {
"//mojo/public/cpp/environment:standalone", "//mojo/public/cpp/environment:standalone",
"//mojo/public/cpp/utility", "//mojo/public/cpp/utility",
"//mojo/public/interfaces/bindings/tests:test_interfaces", "//mojo/public/interfaces/bindings/tests:test_interfaces",
"//mojo/public/html", "//mojo/public/sky",
] ]
if (is_linux) { if (is_linux) {
......
91d94d6993c9b0c4135a95687a7d541ce90629b7 cfc99316100efdfa7d53d83f9e07f1d4d3765c21
\ No newline at end of file \ No newline at end of file
...@@ -20,8 +20,7 @@ source_set("tests") { ...@@ -20,8 +20,7 @@ source_set("tests") {
} }
# GYP version: mojo/mojo_base.gyp:mojo_public_system_perftests # GYP version: mojo/mojo_base.gyp:mojo_public_system_perftests
executable("perftests") { test("perftests") {
testonly = true
output_name = "mojo_public_system_perftests" output_name = "mojo_public_system_perftests"
sources = [ sources = [
......
...@@ -48,6 +48,11 @@ source_set("standalone") { ...@@ -48,6 +48,11 @@ source_set("standalone") {
source_set("test_support") { source_set("test_support") {
testonly = true testonly = true
sources = [
"application_test_base.h",
"lib/application_test_base.cc",
]
deps = [ deps = [
":application", ":application",
"//mojo/public/cpp/bindings", "//mojo/public/cpp/bindings",
...@@ -55,10 +60,15 @@ source_set("test_support") { ...@@ -55,10 +60,15 @@ source_set("test_support") {
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//testing/gtest", "//testing/gtest",
] ]
}
sources = [ source_set("test_support_standalone") {
"application_test_base.h", testonly = true
"lib/application_test_base.cc", sources = [ "lib/application_test_main.cc", ]
"lib/application_test_main.cc", public_deps = [ ":test_support", ]
deps = [
"//mojo/public/cpp/environment:standalone",
"//mojo/public/cpp/application",
"//mojo/public/cpp/system",
] ]
} }
...@@ -19,10 +19,6 @@ class ApplicationDelegate { ...@@ -19,10 +19,6 @@ class ApplicationDelegate {
ApplicationDelegate(); ApplicationDelegate();
virtual ~ApplicationDelegate(); virtual ~ApplicationDelegate();
// Implement this method to create the specific subclass of
// ApplicationDelegate. Ownership is taken by the caller. It will be deleted.
static ApplicationDelegate* Create();
virtual void Initialize(ApplicationImpl* app); virtual void Initialize(ApplicationImpl* app);
// Override this method to configure what services a connection supports when // Override this method to configure what services a connection supports when
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "mojo/public/cpp/system/message_pipe.h" #include "mojo/public/cpp/system/message_pipe.h"
MojoResult MojoMain(MojoHandle shell_handle) { MojoResult MojoMain(MojoHandle shell_handle) {
// An Environment instance is needed to construct run loops.
mojo::Environment environment; mojo::Environment environment;
{ {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/public/interfaces/application/service_provider.mojom"; module mojo;
module mojo { import "mojo/public/interfaces/application/service_provider.mojom";
// Applications vend Services through the ServiceProvider interface. Services // Applications vend Services through the ServiceProvider interface. Services
// implement Interfaces. // implement Interfaces.
...@@ -14,5 +14,3 @@ interface Application { ...@@ -14,5 +14,3 @@ interface Application {
AcceptConnection(string? requestor_url, ServiceProvider? provider); AcceptConnection(string? requestor_url, ServiceProvider? provider);
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
// ServiceProvider is used to establish connections to services in a bi- // ServiceProvider is used to establish connections to services in a bi-
// directional fashion between two applications. // directional fashion between two applications.
...@@ -12,5 +12,3 @@ interface ServiceProvider { ...@@ -12,5 +12,3 @@ interface ServiceProvider {
// service does not exist, then the handle will be closed. // service does not exist, then the handle will be closed.
ConnectToService(string? interface_name, handle<message_pipe>? pipe); ConnectToService(string? interface_name, handle<message_pipe>? pipe);
}; };
}
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/public/interfaces/application/application.mojom"; import "mojo/public/interfaces/application/application.mojom";
import "mojo/public/interfaces/application/service_provider.mojom"; import "mojo/public/interfaces/application/service_provider.mojom";
module mojo {
// The Shell is the finder and launcher of Applications. An Application uses // The Shell is the finder and launcher of Applications. An Application uses
// it's Shell interface to connect to other Applications. // it's Shell interface to connect to other Applications.
[Client=Application] [Client=Application]
...@@ -15,5 +15,3 @@ interface Shell { ...@@ -15,5 +15,3 @@ interface Shell {
// --origin flag to the shell being used. // --origin flag to the shell being used.
ConnectToApplication(string? application_url, ServiceProvider&? provider); ConnectToApplication(string? application_url, ServiceProvider&? provider);
}; };
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.math"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.math"]
module math { module math;
[Client=CalculatorUI] [Client=CalculatorUI]
interface Calculator { interface Calculator {
...@@ -15,5 +15,3 @@ interface Calculator { ...@@ -15,5 +15,3 @@ interface Calculator {
interface CalculatorUI { interface CalculatorUI {
Output@0(double value@0); Output@0(double value@0);
}; };
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"]
module mojo.test { module mojo.test;
struct Rect { struct Rect {
int32 x; int32 x;
...@@ -11,5 +11,3 @@ struct Rect { ...@@ -11,5 +11,3 @@ struct Rect {
int32 width; int32 width;
int32 height; int32 height;
}; };
}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Module containing entities for regression tests of the generator. Entities // Module containing entities for regression tests of the generator. Entities
// must never be modified, instead new entity must be added to add new tests. // must never be modified, instead new entity must be added to add new tests.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.regression_tests"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.regression_tests"]
module regression_tests { module regression_tests;
interface CheckMethodWithEmptyResponse { interface CheckMethodWithEmptyResponse {
WithouParameterAndEmptyResponse() => (); WithouParameterAndEmptyResponse() => ();
...@@ -52,5 +52,3 @@ struct A { ...@@ -52,5 +52,3 @@ struct A {
struct B { struct B {
A? a; A? a;
}; };
} // module imported
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "sample_import.mojom";
[JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"]
module sample { module sample;
import "sample_import.mojom";
// This sample shows how handles to MessagePipes can be sent as both parameters // This sample shows how handles to MessagePipes can be sent as both parameters
// to methods as well as fields on structs. // to methods as well as fields on structs.
...@@ -44,5 +44,3 @@ interface FactoryClient { ...@@ -44,5 +44,3 @@ interface FactoryClient {
DidStuff(Response response, string text); DidStuff(Response response, string text);
DidStuff2(string text); DidStuff2(string text);
}; };
} // module sample
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.imported"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.imported"]
module imported { module imported;
// This sample just defines some types that are imported into // This sample just defines some types that are imported into
// sample_service.mojom, to show how import works. // sample_service.mojom, to show how import works.
...@@ -36,5 +36,3 @@ struct Point { ...@@ -36,5 +36,3 @@ struct Point {
interface ImportedInterface { interface ImportedInterface {
DoSomething(); DoSomething();
}; };
} // module imported
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "sample_import.mojom";
[JavaPackage="org.chromium.mojo.bindings.test.mojom.imported"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.imported"]
module imported { module imported;
import "sample_import.mojom";
// This sample adds more types and constants to the "imported" namespace, // This sample adds more types and constants to the "imported" namespace,
// to test a bug with importing multiple modules with the same namespace. // to test a bug with importing multiple modules with the same namespace.
...@@ -26,5 +26,3 @@ struct Thing { ...@@ -26,5 +26,3 @@ struct Thing {
Point location; Point location;
Size size; Size size;
}; };
} // module imported
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
[JavaPackage="org.chromium.mojo.bindings.test.mojom.sample", [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample",
JavaConstantsClassName="InterfaceConstants", JavaConstantsClassName="InterfaceConstants",
Foo = "hello world"] Foo = "hello world"]
module sample { module sample;
const uint64 kLong = 4405; const uint64 kLong = 4405;
...@@ -24,5 +24,3 @@ interface Provider { ...@@ -24,5 +24,3 @@ interface Provider {
// TODO(darin): We shouldn't need this, but JS bindings don't work without it. // TODO(darin): We shouldn't need this, but JS bindings don't work without it.
interface ProviderClient { interface ProviderClient {
}; };
}
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"]
module sample;
import "sample_import.mojom"; import "sample_import.mojom";
import "sample_import2.mojom"; import "sample_import2.mojom";
[JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"]
module sample {
const uint8 kTwelve = 12; const uint8 kTwelve = 12;
const uint64 kTooBigForSignedInt64 = 9999999999999999999; const uint64 kTooBigForSignedInt64 = 9999999999999999999;
...@@ -124,5 +124,3 @@ interface ServiceClient { ...@@ -124,5 +124,3 @@ interface ServiceClient {
interface Port { interface Port {
PostMessage@0(string message_text@0, Port port@1); PostMessage@0(string message_text@0, Port port@1);
}; };
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
[JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"]
module mojo.test { module mojo.test;
struct Struct1 { struct Struct1 {
uint8 i; uint8 i;
...@@ -34,5 +34,3 @@ struct StructOfNullables { ...@@ -34,5 +34,3 @@ struct StructOfNullables {
Struct1? struct_1; Struct1? struct_1;
string? str; string? str;
}; };
}
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/public/interfaces/bindings/tests/rect.mojom";
[JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"]
module mojo.test { module mojo.test;
import "mojo/public/interfaces/bindings/tests/rect.mojom";
struct NamedRegion { struct NamedRegion {
string? name; string? name;
...@@ -137,5 +137,3 @@ struct MapValueTypes { ...@@ -137,5 +137,3 @@ struct MapValueTypes {
map<string, array<array<string, 2>?>> f4; map<string, array<array<string, 2>?>> f4;
map<string, array<array<string, 2>, 1>> f5; map<string, array<array<string, 2>, 1>> f5;
}; };
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
[JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"] [JavaPackage="org.chromium.mojo.bindings.test.mojom.mojo"]
module mojo.test { module mojo.test;
struct StructA { struct StructA {
uint64 i; uint64 i;
...@@ -58,5 +58,3 @@ interface IntegrationTestInterface1 { ...@@ -58,5 +58,3 @@ interface IntegrationTestInterface1 {
interface IntegrationTestInterface2 { interface IntegrationTestInterface2 {
Method0() => (array<uint8> param0); Method0() => (array<uint8> param0);
}; };
}
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
action_foreach("html") { action_foreach("sky") {
script = "convert_amd_modules_to_html.py" script = "convert_amd_modules_to_sky.py"
sources = [ sources = [
"//mojo/public/js/bindings/buffer.js", "//mojo/public/js/bindings/buffer.js",
"//mojo/public/js/bindings/codec.js", "//mojo/public/js/bindings/codec.js",
...@@ -14,12 +14,12 @@ action_foreach("html") { ...@@ -14,12 +14,12 @@ action_foreach("html") {
"//mojo/public/js/bindings/validator.js", "//mojo/public/js/bindings/validator.js",
] ]
outputs = [ outputs = [
"$target_gen_dir/{{source_name_part}}.html", "$target_gen_dir/{{source_name_part}}.sky",
] ]
args = [ args = [
"--input", "--input",
"{{source}}", "{{source}}",
"--output", "--output",
rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.html" rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.sky"
] ]
} }
...@@ -7,9 +7,9 @@ import argparse ...@@ -7,9 +7,9 @@ import argparse
import sys import sys
import re import re
IMPORT_TEMPLATE = '<link rel="import" href="/%s.html" as="%s" />' IMPORT_TEMPLATE = '<import src="/%s.sky" as="%s" />'
PREAMBLE_TEMPLATE = '<script>' PREAMBLE_TEMPLATE = '<script>'
POSTAMBLE_TEMPLATE = ' this.exports = exports;\n</script>' POSTAMBLE_TEMPLATE = ' module.exports = exports;\n</script>'
class Import(object): class Import(object):
def __init__(self, path, name): def __init__(self, path, name):
...@@ -42,7 +42,7 @@ def AddImportNames(module, unparsed_names): ...@@ -42,7 +42,7 @@ def AddImportNames(module, unparsed_names):
module.imports[i].name = names[i] module.imports[i].name = names[i]
def RewritePathNames(path): def RewritePathNames(path):
return path.replace("mojo/public/js/bindings", "mojo/public/html") return path.replace("mojo/public/js/bindings", "mojo/public/sky")
def Parse(amd_module): def Parse(amd_module):
module = Module() module = Module()
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
Use of this source code is governed by a BSD-style license that can be Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. --> found in the LICENSE file. -->
<link rel="import" href="/mojo/public/html/codec.html" as="codec" /> <import src="/mojo/public/sky/codec.sky" as="codec" />
<link rel="import" href="/mojo/public/html/validator.html" as="validator" /> <import src="/mojo/public/sky/validator.sky" as="validator" />
{%- for import in imports %} {%- for import in imports %}
<link rel="import" href="/{{import.module.path}}.html" as="{{import.unique_name}}" /> <import src="/{{import.module.path}}.sky" as="{{import.unique_name}}" />
{%- endfor %} {%- endfor %}
<script> <script>
{%- include "module_definition.tmpl" %} {%- include "module_definition.tmpl" %}
this.exports = exports; module.exports = exports;
</script> </script>
...@@ -306,7 +306,7 @@ class Generator(generator.Generator): ...@@ -306,7 +306,7 @@ class Generator(generator.Generator):
def GenerateAMDModule(self): def GenerateAMDModule(self):
return self.GetParameters() return self.GetParameters()
@UseJinja("js_templates/module.html.tmpl", filters=js_filters) @UseJinja("js_templates/module.sky.tmpl", filters=js_filters)
def GenerateHTMLModule(self): def GenerateHTMLModule(self):
return self.GetParameters() return self.GetParameters()
...@@ -314,7 +314,7 @@ class Generator(generator.Generator): ...@@ -314,7 +314,7 @@ class Generator(generator.Generator):
self.Write(self.GenerateAMDModule(), self.Write(self.GenerateAMDModule(),
self.MatchMojomFilePath("%s.js" % self.module.name)) self.MatchMojomFilePath("%s.js" % self.module.name))
self.Write(self.GenerateHTMLModule(), self.Write(self.GenerateHTMLModule(),
self.MatchMojomFilePath("%s.html" % self.module.name)) self.MatchMojomFilePath("%s.sky" % self.module.name))
def GetImports(self): def GetImports(self):
used_names = set() used_names = set()
......
...@@ -60,7 +60,7 @@ template("mojom") { ...@@ -60,7 +60,7 @@ template("mojom") {
"$generator_root/generators/js_templates/enum_definition.tmpl", "$generator_root/generators/js_templates/enum_definition.tmpl",
"$generator_root/generators/js_templates/interface_definition.tmpl", "$generator_root/generators/js_templates/interface_definition.tmpl",
"$generator_root/generators/js_templates/module.amd.tmpl", "$generator_root/generators/js_templates/module.amd.tmpl",
"$generator_root/generators/js_templates/module.html.tmpl", "$generator_root/generators/js_templates/module.sky.tmpl",
"$generator_root/generators/js_templates/module_definition.tmpl", "$generator_root/generators/js_templates/module_definition.tmpl",
"$generator_root/generators/js_templates/struct_definition.tmpl", "$generator_root/generators/js_templates/struct_definition.tmpl",
"$generator_root/generators/python_templates/module_macros.tmpl", "$generator_root/generators/python_templates/module_macros.tmpl",
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
'<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl',
'<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl',
'<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl',
'<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module.html.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/module.sky.tmpl',
'<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/struct_definition.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/js_templates/struct_definition.tmpl',
'<(DEPTH)/mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl',
'<(DEPTH)/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl', '<(DEPTH)/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl',
......
...@@ -249,7 +249,7 @@ class Module(NodeBase): ...@@ -249,7 +249,7 @@ class Module(NodeBase):
class Mojom(NodeBase): class Mojom(NodeBase):
"""Represents an entire .mojom file. (This is the root node.""" """Represents an entire .mojom file. (This is the root node.)"""
def __init__(self, module, import_list, definition_list, **kwargs): def __init__(self, module, import_list, definition_list, **kwargs):
assert module is None or isinstance(module, Module) assert module is None or isinstance(module, Module)
......
...@@ -71,41 +71,47 @@ class Parser(object): ...@@ -71,41 +71,47 @@ class Parser(object):
# renaming "module" -> "package".) Then we'll be able to have a single rule # renaming "module" -> "package".) Then we'll be able to have a single rule
# for root (by making module "optional"). # for root (by making module "optional").
def p_root_1(self, p): def p_root_1(self, p):
"""root : import_list module LBRACE definition_list RBRACE""" """root : """
p[0] = ast.Mojom(p[2], p[1], p[4]) p[0] = ast.Mojom(None, ast.ImportList(), [])
def p_root_2(self, p): def p_root_2(self, p):
"""root : import_list definition_list""" """root : root module"""
p[0] = ast.Mojom(None, p[1], p[2]) if p[1].module is not None:
raise ParseError(self.filename,
def p_import_list_1(self, p): "Multiple \"module\" statements not allowed:",
"""import_list : """ p[2].lineno, snippet=self._GetSnippet(p[2].lineno))
p[0] = ast.ImportList() if p[1].import_list.items or p[1].definition_list:
raise ParseError(
self.filename,
"\"module\" statements must precede imports and definitions:",
p[2].lineno, snippet=self._GetSnippet(p[2].lineno))
p[0] = p[1]
p[0].module = p[2]
def p_root_3(self, p):
"""root : root import"""
if p[1].definition_list:
raise ParseError(self.filename,
"\"import\" statements must precede definitions:",
p[2].lineno, snippet=self._GetSnippet(p[2].lineno))
p[0] = p[1]
p[0].import_list.Append(p[2])
def p_import_list_2(self, p): def p_root_4(self, p):
"""import_list : import_list import""" """root : root definition"""
p[0] = p[1] p[0] = p[1]
p[0].Append(p[2]) p[0].definition_list.append(p[2])
def p_import(self, p): def p_import(self, p):
"""import : IMPORT STRING_LITERAL SEMI""" """import : IMPORT STRING_LITERAL SEMI"""
# 'eval' the literal to strip the quotes. # 'eval' the literal to strip the quotes.
# TODO(vtl): This eval is dubious. We should unquote/unescape ourselves. # TODO(vtl): This eval is dubious. We should unquote/unescape ourselves.
p[0] = ast.Import(eval(p[2])) p[0] = ast.Import(eval(p[2]), filename=self.filename, lineno=p.lineno(2))
def p_module(self, p): def p_module(self, p):
"""module : attribute_section MODULE identifier_wrapped """ """module : attribute_section MODULE identifier_wrapped SEMI"""
p[0] = ast.Module(p[3], p[1], filename=self.filename, lineno=p.lineno(2)) p[0] = ast.Module(p[3], p[1], filename=self.filename, lineno=p.lineno(2))
def p_definition_list(self, p):
"""definition_list : definition definition_list
| """
if len(p) > 1:
p[0] = p[2]
p[0].insert(0, p[1])
else:
p[0] = []
def p_definition(self, p): def p_definition(self, p):
"""definition : struct """definition : struct
| interface | interface
...@@ -271,7 +277,7 @@ class Parser(object): ...@@ -271,7 +277,7 @@ class Parser(object):
"""fixed_array : ARRAY LANGLE typename COMMA INT_CONST_DEC RANGLE""" """fixed_array : ARRAY LANGLE typename COMMA INT_CONST_DEC RANGLE"""
value = int(p[5]) value = int(p[5])
if value == 0 or value > _MAX_ARRAY_SIZE: if value == 0 or value > _MAX_ARRAY_SIZE:
raise ParseError(self.filename, "Fixed array size %d invalid" % value, raise ParseError(self.filename, "Fixed array size %d invalid:" % value,
lineno=p.lineno(5), lineno=p.lineno(5),
snippet=self._GetSnippet(p.lineno(5))) snippet=self._GetSnippet(p.lineno(5)))
p[0] = p[3] + "[" + p[5] + "]" p[0] = p[3] + "[" + p[5] + "]"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import argparse
import os import os
import subprocess import subprocess
import sys import sys
...@@ -18,37 +19,48 @@ if not sys.platform.startswith("linux"): ...@@ -18,37 +19,48 @@ if not sys.platform.startswith("linux"):
print "Not supported for your platform" print "Not supported for your platform"
sys.exit(0) sys.exit(0)
version_path = os.path.join(current_path, "../VERSION")
with open(version_path) as version_file:
version = version_file.read().strip()
prebuilt_file_path = os.path.join(current_path, "prebuilt") prebuilt_file_path = os.path.join(current_path, "prebuilt")
stamp_path = os.path.join(prebuilt_file_path, "VERSION") stamp_path = os.path.join(prebuilt_file_path, "VERSION")
try: depot_tools_path = find_depot_tools.add_depot_tools_to_path()
with open(stamp_path) as stamp_file: gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil")
current_version = stamp_file.read().strip()
if current_version == version:
sys.exit(0)
except IOError:
pass
platform = "linux-x64" # TODO: configurate def download():
basename = platform + ".zip" version_path = os.path.join(current_path, "../VERSION")
with open(version_path) as version_file:
version = version_file.read().strip()
gs_path = "gs://mojo/shell/" + version + "/" + basename try:
with open(stamp_path) as stamp_file:
current_version = stamp_file.read().strip()
if current_version == version:
return 0 # Already have the right version.
except IOError:
pass # If the stamp file does not exist we need to download a new binary.
depot_tools_path = find_depot_tools.add_depot_tools_to_path() platform = "linux-x64" # TODO: configurate
gsutil_exe = os.path.join(depot_tools_path, "third_party", "gsutil", "gsutil") basename = platform + ".zip"
gs_path = "gs://mojo/shell/" + version + "/" + basename
with tempfile.NamedTemporaryFile() as temp_zip_file:
subprocess.check_call([gsutil_exe, "--bypass_prodaccess",
"cp", gs_path, temp_zip_file.name])
with zipfile.ZipFile(temp_zip_file.name) as z:
zi = z.getinfo("mojo_shell")
mode = zi.external_attr >> 16L
z.extract(zi, prebuilt_file_path)
os.chmod(os.path.join(prebuilt_file_path, "mojo_shell"), mode)
with open(stamp_path, 'w') as stamp_file:
stamp_file.write(version)
return 0
def main():
parser = argparse.ArgumentParser(description="Download mojo_shell binary "
"from google storage")
parser.parse_args()
return download()
with tempfile.NamedTemporaryFile() as temp_zip_file: if __name__ == "__main__":
subprocess.check_call([gsutil_exe, "--bypass_prodaccess", sys.exit(main())
"cp", gs_path, temp_zip_file.name])
with zipfile.ZipFile(temp_zip_file.name) as z:
zi = z.getinfo("mojo_shell")
mode = zi.external_attr >> 16L
z.extract(zi, prebuilt_file_path)
os.chmod(os.path.join(prebuilt_file_path, "mojo_shell"), mode)
with open(stamp_path, 'w') as stamp_file:
stamp_file.write(version + "\n")
...@@ -15,7 +15,6 @@ group("services") { ...@@ -15,7 +15,6 @@ group("services") {
"//mojo/services/public/interfaces/network", "//mojo/services/public/interfaces/network",
"//mojo/services/public/interfaces/surfaces", "//mojo/services/public/interfaces/surfaces",
"//mojo/services/public/interfaces/view_manager", "//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager2",
] ]
if (!is_component_build) { if (!is_component_build) {
......
...@@ -33,6 +33,7 @@ inline bool operator==(const Point& lhs, const Point& rhs) { ...@@ -33,6 +33,7 @@ inline bool operator==(const Point& lhs, const Point& rhs) {
inline bool operator!=(const Point& lhs, const Point& rhs) { inline bool operator!=(const Point& lhs, const Point& rhs) {
return !(lhs == rhs); return !(lhs == rhs);
} }
} }
#endif // MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_UTIL_H_ #endif // MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_UTIL_H_
\ No newline at end of file
...@@ -35,7 +35,6 @@ source_set("view_manager") { ...@@ -35,7 +35,6 @@ source_set("view_manager") {
"//mojo/services/public/interfaces/surfaces:surface_id", "//mojo/services/public/interfaces/surfaces:surface_id",
"//mojo/services/public/interfaces/view_manager", "//mojo/services/public/interfaces/view_manager",
"//mojo/services/public/interfaces/window_manager", "//mojo/services/public/interfaces/window_manager",
"//mojo/services/public/interfaces/window_manager2",
] ]
} }
......
...@@ -21,9 +21,4 @@ source_set("run_unittests") { ...@@ -21,9 +21,4 @@ source_set("run_unittests") {
if (use_x11) { if (use_x11) {
deps += ["//ui/gfx/x"] deps += ["//ui/gfx/x"]
} }
if (is_component_build) {
deps += ["//ui/gl"]
}
} }
...@@ -94,10 +94,6 @@ class RootObserver : public ViewObserver { ...@@ -94,10 +94,6 @@ class RootObserver : public ViewObserver {
ViewManagerClientImpl::ViewManagerClientImpl(ViewManagerDelegate* delegate, ViewManagerClientImpl::ViewManagerClientImpl(ViewManagerDelegate* delegate,
Shell* shell) Shell* shell)
: connected_(false), connection_id_(0), next_id_(1), delegate_(delegate) { : connected_(false), connection_id_(0), next_id_(1), delegate_(delegate) {
InterfacePtr<ServiceProvider> sp;
shell->ConnectToApplication("mojo:window_manager", GetProxy(&sp));
ConnectToService(sp.get(), &window_manager_);
window_manager_.set_client(this);
} }
ViewManagerClientImpl::~ViewManagerClientImpl() { ViewManagerClientImpl::~ViewManagerClientImpl() {
...@@ -170,6 +166,9 @@ void ViewManagerClientImpl::SetSurfaceId(Id view_id, SurfaceIdPtr surface_id) { ...@@ -170,6 +166,9 @@ void ViewManagerClientImpl::SetSurfaceId(Id view_id, SurfaceIdPtr surface_id) {
} }
void ViewManagerClientImpl::SetFocus(Id view_id) { void ViewManagerClientImpl::SetFocus(Id view_id) {
// In order for us to get here we had to have exposed a view, which implies we
// got a connection.
DCHECK(window_manager_.get());
window_manager_->FocusWindow(view_id, ActionCompletedCallback()); window_manager_->FocusWindow(view_id, ActionCompletedCallback());
} }
...@@ -245,7 +244,8 @@ void ViewManagerClientImpl::OnEmbed( ...@@ -245,7 +244,8 @@ void ViewManagerClientImpl::OnEmbed(
ConnectionSpecificId connection_id, ConnectionSpecificId connection_id,
const String& creator_url, const String& creator_url,
ViewDataPtr root_data, ViewDataPtr root_data,
InterfaceRequest<ServiceProvider> service_provider) { InterfaceRequest<ServiceProvider> parent_services,
ScopedMessagePipeHandle window_manager_pipe) {
if (!connected_) { if (!connected_) {
connected_ = true; connected_ = true;
connection_id_ = connection_id; connection_id_ = connection_id;
...@@ -264,12 +264,14 @@ void ViewManagerClientImpl::OnEmbed( ...@@ -264,12 +264,14 @@ void ViewManagerClientImpl::OnEmbed(
ServiceProviderImpl* exported_services = nullptr; ServiceProviderImpl* exported_services = nullptr;
scoped_ptr<ServiceProvider> remote; scoped_ptr<ServiceProvider> remote;
if (service_provider.is_pending()) { if (parent_services.is_pending()) {
// BindToRequest() binds the lifetime of |exported_services| to the pipe. // BindToRequest() binds the lifetime of |exported_services| to the pipe.
exported_services = new ServiceProviderImpl; exported_services = new ServiceProviderImpl;
BindToRequest(exported_services, &service_provider); BindToRequest(exported_services, &parent_services);
remote.reset(exported_services->CreateRemoteServiceProvider()); remote.reset(exported_services->CreateRemoteServiceProvider());
} }
window_manager_.Bind(window_manager_pipe.Pass());
window_manager_.set_client(this);
delegate_->OnEmbed(this, root, exported_services, remote.Pass()); delegate_->OnEmbed(this, root, exported_services, remote.Pass());
} }
...@@ -360,9 +362,7 @@ void ViewManagerClientImpl::OnViewInputEvent( ...@@ -360,9 +362,7 @@ void ViewManagerClientImpl::OnViewInputEvent(
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// ViewManagerClientImpl, WindowManagerClient2 implementation: // ViewManagerClientImpl, WindowManagerClient implementation:
void ViewManagerClientImpl::OnWindowManagerReady() {}
void ViewManagerClientImpl::OnCaptureChanged(Id old_capture_view_id, void ViewManagerClientImpl::OnCaptureChanged(Id old_capture_view_id,
Id new_capture_view_id) {} Id new_capture_view_id) {}
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "mojo/services/public/cpp/view_manager/view.h" #include "mojo/services/public/cpp/view_manager/view.h"
#include "mojo/services/public/cpp/view_manager/view_manager.h" #include "mojo/services/public/cpp/view_manager/view_manager.h"
#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
#include "mojo/services/public/interfaces/window_manager2/window_manager2.mojom.h" #include "mojo/services/public/interfaces/window_manager/window_manager.mojom.h"
namespace mojo { namespace mojo {
class Shell; class Shell;
...@@ -24,7 +24,7 @@ class ViewManagerTransaction; ...@@ -24,7 +24,7 @@ class ViewManagerTransaction;
// Manages the connection with the View Manager service. // Manages the connection with the View Manager service.
class ViewManagerClientImpl : public ViewManager, class ViewManagerClientImpl : public ViewManager,
public InterfaceImpl<ViewManagerClient>, public InterfaceImpl<ViewManagerClient>,
public WindowManagerClient2 { public WindowManagerClient {
public: public:
ViewManagerClientImpl(ViewManagerDelegate* delegate, Shell* shell); ViewManagerClientImpl(ViewManagerDelegate* delegate, Shell* shell);
~ViewManagerClientImpl() override; ~ViewManagerClientImpl() override;
...@@ -90,7 +90,8 @@ class ViewManagerClientImpl : public ViewManager, ...@@ -90,7 +90,8 @@ class ViewManagerClientImpl : public ViewManager,
void OnEmbed(ConnectionSpecificId connection_id, void OnEmbed(ConnectionSpecificId connection_id,
const String& creator_url, const String& creator_url,
ViewDataPtr root, ViewDataPtr root,
InterfaceRequest<ServiceProvider> services) override; InterfaceRequest<ServiceProvider> parent_services,
ScopedMessagePipeHandle window_manager_pipe) override;
void OnViewBoundsChanged(Id view_id, void OnViewBoundsChanged(Id view_id,
RectPtr old_bounds, RectPtr old_bounds,
RectPtr new_bounds) override; RectPtr new_bounds) override;
...@@ -111,8 +112,7 @@ class ViewManagerClientImpl : public ViewManager, ...@@ -111,8 +112,7 @@ class ViewManagerClientImpl : public ViewManager,
EventPtr event, EventPtr event,
const Callback<void()>& callback) override; const Callback<void()>& callback) override;
// Overridden from WindowManagerClient2: // Overridden from WindowManagerClient:
void OnWindowManagerReady() override;
void OnCaptureChanged(Id old_capture_view_id, void OnCaptureChanged(Id old_capture_view_id,
Id new_capture_view_id) override; Id new_capture_view_id) override;
void OnFocusChanged(Id old_focused_view_id, Id new_focused_view_id) override; void OnFocusChanged(Id old_focused_view_id, Id new_focused_view_id) override;
...@@ -143,7 +143,7 @@ class ViewManagerClientImpl : public ViewManager, ...@@ -143,7 +143,7 @@ class ViewManagerClientImpl : public ViewManager,
ViewManagerService* service_; ViewManagerService* service_;
WindowManagerService2Ptr window_manager_; WindowManagerPtr window_manager_;
DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl);
}; };
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h" #include "mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h"
#include "base/i18n/icu_util.h" #include "base/i18n/icu_util.h"
#include "ui/gl/gl_surface.h"
#if defined(USE_X11) #if defined(USE_X11)
#include "ui/gfx/x/x11_connection.h" #include "ui/gfx/x/x11_connection.h"
...@@ -26,10 +25,6 @@ void ViewManagerTestSuite::Initialize() { ...@@ -26,10 +25,6 @@ void ViewManagerTestSuite::Initialize() {
gfx::InitializeThreadedX11(); gfx::InitializeThreadedX11();
#endif #endif
#if defined(COMPONENT_BUILD)
gfx::GLSurface::InitializeOneOffForTests();
#endif
base::TestSuite::Initialize(); base::TestSuite::Initialize();
// base::TestSuite and ViewsInit both try to load icu. That's ok for tests. // base::TestSuite and ViewsInit both try to load icu. That's ok for tests.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
interface Clipboard { interface Clipboard {
enum Type { enum Type {
...@@ -41,5 +41,3 @@ interface Clipboard { ...@@ -41,5 +41,3 @@ interface Clipboard {
// clear the clipboard. // clear the clipboard.
WriteClipboardData(Type clipboard_type, map<string, array<uint8>>? data); WriteClipboardData(Type clipboard_type, map<string, array<uint8>>? data);
}; };
} // module mojo
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/public/interfaces/application/shell.mojom"; import "mojo/public/interfaces/application/shell.mojom";
import "mojo/services/public/interfaces/network/url_loader.mojom"; import "mojo/services/public/interfaces/network/url_loader.mojom";
module mojo {
interface ContentHandler { interface ContentHandler {
StartApplication(Shell shell, URLResponse response); StartApplication(Shell shell, URLResponse response);
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
struct Point { struct Point {
int32 x; int32 x;
...@@ -37,5 +37,3 @@ struct Transform { ...@@ -37,5 +37,3 @@ struct Transform {
// Row major order. // Row major order.
array<float, 16>? matrix; array<float, 16>? matrix;
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
struct CommandBufferState { struct CommandBufferState {
int32 num_entries; int32 num_entries;
...@@ -38,5 +38,3 @@ interface CommandBufferClient { ...@@ -38,5 +38,3 @@ interface CommandBufferClient {
DidDestroy(); DidDestroy();
LostContext(int32 lost_reason); // TODO(piman): enum LostContext(int32 lost_reason); // TODO(piman): enum
}; };
}
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/gpu/command_buffer.mojom"; import "mojo/services/public/interfaces/gpu/command_buffer.mojom";
module mojo {
interface Gpu { interface Gpu {
CreateOnscreenGLES2Context(uint64 native_viewport_id, Size? size, CommandBuffer&? gles2_client); CreateOnscreenGLES2Context(uint64 native_viewport_id, Size? size, CommandBuffer&? gles2_client);
CreateOffscreenGLES2Context(CommandBuffer&? gles2_client); CreateOffscreenGLES2Context(CommandBuffer&? gles2_client);
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
// This mirrors ui::EventType // This mirrors ui::EventType
enum EventType { enum EventType {
...@@ -75,5 +75,3 @@ enum MouseEventFlags { ...@@ -75,5 +75,3 @@ enum MouseEventFlags {
// TODO(erg): Move accessibility flags and maybe synthetic touch events here. // TODO(erg): Move accessibility flags and maybe synthetic touch events here.
}; };
} // module mojo
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/input_events/input_event_constants.mojom"; import "mojo/services/public/interfaces/input_events/input_event_constants.mojom";
import "mojo/services/public/interfaces/input_events/input_key_codes.mojom"; import "mojo/services/public/interfaces/input_events/input_key_codes.mojom";
module mojo {
struct LocationData { struct LocationData {
Point? in_view_location; Point? in_view_location;
Point? screen_location; Point? screen_location;
...@@ -70,5 +70,3 @@ struct Event { ...@@ -70,5 +70,3 @@ struct Event {
TouchData? touch_data; TouchData? touch_data;
MouseWheelData? wheel_data; MouseWheelData? wheel_data;
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
// Cross platform keyboard codes. // Cross platform keyboard codes.
// //
...@@ -184,5 +184,3 @@ enum KeyboardCode { ...@@ -184,5 +184,3 @@ enum KeyboardCode {
// VK_OEM_AX to represent AltGr, matching the behaviour of Firefox on Linux. // VK_OEM_AX to represent AltGr, matching the behaviour of Firefox on Linux.
ALTGR = 0xE1, ALTGR = 0xE1,
}; };
} // module mojo
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/gpu/command_buffer.mojom"; import "mojo/services/public/interfaces/gpu/command_buffer.mojom";
import "mojo/services/public/interfaces/input_events/input_events.mojom"; import "mojo/services/public/interfaces/input_events/input_events.mojom";
import "mojo/services/public/interfaces/surfaces/surface_id.mojom"; import "mojo/services/public/interfaces/surfaces/surface_id.mojom";
module mojo {
[Client=NativeViewportClient] [Client=NativeViewportClient]
interface NativeViewport { interface NativeViewport {
// TODO(sky): having a create function is awkward. Should there be a factory // TODO(sky): having a create function is awkward. Should there be a factory
...@@ -32,5 +32,3 @@ interface NativeViewportClient { ...@@ -32,5 +32,3 @@ interface NativeViewportClient {
OnSizeChanged(Size size); OnSizeChanged(Size size);
OnDestroyed(); OnDestroyed();
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/services/public/interfaces/network/url_loader.mojom"; module mojo;
module mojo { import "mojo/services/public/interfaces/network/url_loader.mojom";
// Expresses a preference for where a navigation will be performed. // Expresses a preference for where a navigation will be performed.
enum Target { enum Target {
...@@ -26,5 +26,3 @@ interface NavigatorHost { ...@@ -26,5 +26,3 @@ interface NavigatorHost {
// locally. For example, pushState() navigations in an HTML application. // locally. For example, pushState() navigations in an HTML application.
DidNavigateLocally(string url); DidNavigateLocally(string url);
}; };
}
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
interface CookieStore { interface CookieStore {
Get(string? url) => (string? cookies); Get(string? url) => (string? cookies);
Set(string? url, string? cookie) => (bool success); Set(string? url, string? cookie) => (bool success);
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
enum NetAddressFamily { enum NetAddressFamily {
UNSPECIFIED, UNSPECIFIED,
...@@ -37,6 +37,3 @@ struct NetAddress { ...@@ -37,6 +37,3 @@ struct NetAddress {
NetAddressIPv4? ipv4; NetAddressIPv4? ipv4;
NetAddressIPv6? ipv6; NetAddressIPv6? ipv6;
}; };
}
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
struct NetworkError { struct NetworkError {
int32 code; int32 code;
string? description; string? description;
}; };
}
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/network/cookie_store.mojom"; import "mojo/services/public/interfaces/network/cookie_store.mojom";
import "mojo/services/public/interfaces/network/net_address.mojom"; import "mojo/services/public/interfaces/network/net_address.mojom";
import "mojo/services/public/interfaces/network/network_error.mojom"; import "mojo/services/public/interfaces/network/network_error.mojom";
...@@ -11,8 +13,6 @@ import "mojo/services/public/interfaces/network/udp_socket.mojom"; ...@@ -11,8 +13,6 @@ import "mojo/services/public/interfaces/network/udp_socket.mojom";
import "mojo/services/public/interfaces/network/url_loader.mojom"; import "mojo/services/public/interfaces/network/url_loader.mojom";
import "mojo/services/public/interfaces/network/web_socket.mojom"; import "mojo/services/public/interfaces/network/web_socket.mojom";
module mojo {
// TODO Darin suggfests that this should probably be two classes. One for // TODO Darin suggfests that this should probably be two classes. One for
// high-level origin-build requests like WebSockets and HTTP, and the other for // high-level origin-build requests like WebSockets and HTTP, and the other for
// non-origin-bound low-level stuff like DNS, UDP, and TCP. // non-origin-bound low-level stuff like DNS, UDP, and TCP.
...@@ -59,5 +59,3 @@ interface NetworkService { ...@@ -59,5 +59,3 @@ interface NetworkService {
CreateUDPSocket(UDPSocket& socket); CreateUDPSocket(UDPSocket& socket);
}; };
}
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/network/net_address.mojom"; import "mojo/services/public/interfaces/network/net_address.mojom";
import "mojo/services/public/interfaces/network/network_error.mojom"; import "mojo/services/public/interfaces/network/network_error.mojom";
import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom"; import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom";
import "mojo/services/public/interfaces/network/tcp_server_socket.mojom"; import "mojo/services/public/interfaces/network/tcp_server_socket.mojom";
module mojo {
// Represents a TCP socket that is bound to a local address and port, but // Represents a TCP socket that is bound to a local address and port, but
// is not yet in a listening or connected state. // is not yet in a listening or connected state.
// //
...@@ -37,5 +37,3 @@ interface TCPBoundSocket { ...@@ -37,5 +37,3 @@ interface TCPBoundSocket {
TCPConnectedSocket& client_socket) TCPConnectedSocket& client_socket)
=> (NetworkError result); => (NetworkError result);
}; };
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
// Represents a TCP socket connected to a remote system. // Represents a TCP socket connected to a remote system.
// //
...@@ -12,5 +12,3 @@ interface TCPConnectedSocket { ...@@ -12,5 +12,3 @@ interface TCPConnectedSocket {
// TODO(brettw) here we put options and what not for controlling the // TODO(brettw) here we put options and what not for controlling the
// connection. // connection.
}; };
}
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/network/net_address.mojom"; import "mojo/services/public/interfaces/network/net_address.mojom";
import "mojo/services/public/interfaces/network/network_error.mojom"; import "mojo/services/public/interfaces/network/network_error.mojom";
import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom"; import "mojo/services/public/interfaces/network/tcp_connected_socket.mojom";
module mojo {
// Represents a TCP server socket listening for incoming requests. // Represents a TCP server socket listening for incoming requests.
interface TCPServerSocket { interface TCPServerSocket {
// Waits for an incoming connection request and hooks up a TCPConnectedSocket // Waits for an incoming connection request and hooks up a TCPConnectedSocket
...@@ -24,5 +24,3 @@ interface TCPServerSocket { ...@@ -24,5 +24,3 @@ interface TCPServerSocket {
TCPConnectedSocket& client_socket) TCPConnectedSocket& client_socket)
=> (NetworkError result, NetAddress? remote_address); => (NetworkError result, NetAddress? remote_address);
}; };
}
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/network/net_address.mojom"; import "mojo/services/public/interfaces/network/net_address.mojom";
import "mojo/services/public/interfaces/network/network_error.mojom"; import "mojo/services/public/interfaces/network/network_error.mojom";
module mojo {
// UDPSocket and UDPSocketClient represent a UDP socket and its client. The // UDPSocket and UDPSocketClient represent a UDP socket and its client. The
// typical flow of using the interfaces is: // typical flow of using the interfaces is:
// - Acquire a UDPSocket interface pointer and set a UDPSocketClient instance. // - Acquire a UDPSocket interface pointer and set a UDPSocketClient instance.
...@@ -104,5 +104,3 @@ interface UDPSocketClient { ...@@ -104,5 +104,3 @@ interface UDPSocketClient {
// failure, |result.code| is a network error code. // failure, |result.code| is a network error code.
OnReceived(NetworkError result, NetAddress? src_addr, array<uint8>? data); OnReceived(NetworkError result, NetAddress? src_addr, array<uint8>? data);
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/services/public/interfaces/network/network_error.mojom"; module mojo;
module mojo { import "mojo/services/public/interfaces/network/network_error.mojom";
struct URLRequest { struct URLRequest {
// The URL to load. // The URL to load.
...@@ -102,5 +102,3 @@ interface URLLoader { ...@@ -102,5 +102,3 @@ interface URLLoader {
// Query status about the URLLoader. // Query status about the URLLoader.
QueryStatus() => (URLLoaderStatus? status); QueryStatus() => (URLLoaderStatus? status);
}; };
}
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/services/public/interfaces/network/network_error.mojom"; module mojo;
module mojo { import "mojo/services/public/interfaces/network/network_error.mojom";
interface WebSocket { interface WebSocket {
enum MessageType { enum MessageType {
...@@ -58,5 +58,3 @@ interface WebSocketClient { ...@@ -58,5 +58,3 @@ interface WebSocketClient {
// didFinishOpeningHandshake // didFinishOpeningHandshake
// didStartClosingHandshake // didStartClosingHandshake
}; };
}
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/surfaces/surface_id.mojom"; import "mojo/services/public/interfaces/surfaces/surface_id.mojom";
module mojo {
struct Color { struct Color {
uint32 rgba; uint32 rgba;
}; };
...@@ -207,5 +207,3 @@ struct Pass { ...@@ -207,5 +207,3 @@ struct Pass {
array<Quad> quads; array<Quad> quads;
array<SharedQuadState> shared_quad_states; array<SharedQuadState> shared_quad_states;
}; };
}
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
struct SurfaceId { struct SurfaceId {
uint64 id; uint64 id;
}; };
}
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/gpu/command_buffer.mojom"; import "mojo/services/public/interfaces/gpu/command_buffer.mojom";
import "mojo/services/public/interfaces/surfaces/quads.mojom"; import "mojo/services/public/interfaces/surfaces/quads.mojom";
import "mojo/services/public/interfaces/surfaces/surface_id.mojom"; import "mojo/services/public/interfaces/surfaces/surface_id.mojom";
module mojo {
enum ResourceFormat { enum ResourceFormat {
RGBA_8888, RGBA_8888,
RGBA_4444, RGBA_4444,
...@@ -69,5 +69,3 @@ interface Surface { ...@@ -69,5 +69,3 @@ interface Surface {
SurfaceId id, SurfaceId id,
Size size); Size size);
}; };
}
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import "mojo/services/public/interfaces/surfaces/surfaces.mojom"; module mojo;
module mojo { import "mojo/services/public/interfaces/surfaces/surfaces.mojom";
// Use this interface to request connections to the surfaces service. Each // Use this interface to request connections to the surfaces service. Each
// connection is associated with an id namespace // connection is associated with an id namespace
interface SurfacesService { interface SurfacesService {
CreateSurfaceConnection() => (Surface surface, uint32 id_namespace); CreateSurfaceConnection() => (Surface surface, uint32 id_namespace);
}; };
}
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/public/interfaces/application/service_provider.mojom"; import "mojo/public/interfaces/application/service_provider.mojom";
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/input_events/input_events.mojom"; import "mojo/services/public/interfaces/input_events/input_events.mojom";
import "mojo/services/public/interfaces/surfaces/surface_id.mojom"; import "mojo/services/public/interfaces/surfaces/surface_id.mojom";
import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojom"; import "mojo/services/public/interfaces/view_manager/view_manager_constants.mojom";
module mojo {
struct ViewData { struct ViewData {
uint32 parent_id; uint32 parent_id;
uint32 view_id; uint32 view_id;
...@@ -136,11 +136,13 @@ interface ViewManagerService { ...@@ -136,11 +136,13 @@ interface ViewManagerService {
[Client=ViewManagerService] [Client=ViewManagerService]
interface ViewManagerClient { interface ViewManagerClient {
// Invoked when the client application has been embedded at |root|. // Invoked when the client application has been embedded at |root|.
// See Embed() on ViewManagerService for more details. // See Embed() on ViewManagerService for more details. |window_manager_pipe|
// is a pipe to the WindowManager.
OnEmbed(uint16 connection_id, OnEmbed(uint16 connection_id,
string embedder_url, string embedder_url,
ViewData root, ViewData root,
ServiceProvider&? service_provider); ServiceProvider&? parent_service_provider,
handle<message_pipe> window_manager_pipe);
// Invoked when a view's bounds have changed. // Invoked when a view's bounds have changed.
OnViewBoundsChanged(uint32 view, OnViewBoundsChanged(uint32 view,
...@@ -188,5 +190,3 @@ interface ViewManagerClient { ...@@ -188,5 +190,3 @@ interface ViewManagerClient {
// Invoked when an event is targeted at the specified view. // Invoked when an event is targeted at the specified view.
OnViewInputEvent(uint32 view, mojo.Event event) => (); OnViewInputEvent(uint32 view, mojo.Event event) => ();
}; };
}
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
enum OrderDirection { enum OrderDirection {
ABOVE = 1, ABOVE = 1,
BELOW, BELOW,
}; };
}
...@@ -2,15 +2,24 @@ ...@@ -2,15 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/public/interfaces/application/service_provider.mojom"; import "mojo/public/interfaces/application/service_provider.mojom";
import "mojo/services/public/interfaces/input_events/input_events.mojom"; import "mojo/services/public/interfaces/input_events/input_events.mojom";
module mojo { [Client=WindowManagerClient]
interface WindowManager { interface WindowManager {
// Requests the WindowManager to embed the app for |url| at an appropriate // Requests the WindowManager to embed the app for |url| at an appropriate
// View. See ViewManger::Embed() for details on |service_provider|. // View. See ViewManger::Embed() for details on |service_provider|.
Embed(string url, ServiceProvider&? service_provider); Embed(string url, ServiceProvider&? service_provider);
SetCapture(uint32 view_id) => (bool success);
FocusWindow(uint32 view_id) => (bool success);
ActivateWindow(uint32 view_id) => (bool success);
}; };
} interface WindowManagerClient {
OnCaptureChanged(uint32 old_capture_view_id, uint32 new_capture_view_id);
OnFocusChanged(uint32 old_focused_node_id, uint32 new_focused_node_id);
OnActiveWindowChanged(uint32 old_focused_window, uint32 new_focused_window);
};
...@@ -2,13 +2,25 @@ ...@@ -2,13 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo;
import "mojo/services/public/interfaces/geometry/geometry.mojom"; import "mojo/services/public/interfaces/geometry/geometry.mojom";
import "mojo/services/public/interfaces/input_events/input_events.mojom"; import "mojo/services/public/interfaces/input_events/input_events.mojom";
module mojo { // WindowManagerInternal is an interface provided by the WindowManager
// exclusively to the ViewManager.
interface WindowManagerInternal {
// Creates a connection to the WindowManager specifically for a connection to
// the ViewManager. |connection_id| is the id of the connection to the
// ViewManager. See view_manager.mojom for details on the id.
CreateWindowManagerForViewManagerClient(
uint16 connection_id,
handle<message_pipe> window_manager_pipe);
};
// ViewManager provides this interface to the WindowManager. It enables // WindowManagerInternalClient is an interface provide by the ViewManager
// capabilities specific to the WindowManager. // exclusively to the WindowManager. It provides functionality only available
// to the WindowManager.
interface WindowManagerInternalClient { interface WindowManagerInternalClient {
// Dispatches the specified input event to the specified view. // Dispatches the specified input event to the specified view.
DispatchInputEventToView(uint32 view_id, mojo.Event event); DispatchInputEventToView(uint32 view_id, mojo.Event event);
...@@ -16,5 +28,3 @@ interface WindowManagerInternalClient { ...@@ -16,5 +28,3 @@ interface WindowManagerInternalClient {
// Sets the native viewport size. // Sets the native viewport size.
SetViewportSize(mojo.Size size); SetViewportSize(mojo.Size size);
}; };
}
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
# GYP version: mojo/mojo_services.gypi:mojo_core_window_manager_bindings
mojom("window_manager2") {
sources = [
"window_manager2.mojom",
]
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module mojo { module mojo;
// TODO(sky): rethink these, and if we do in fact need it come up with a better // TODO(sky): rethink these, and if we do in fact need it come up with a better
// name. // name.
...@@ -27,5 +27,3 @@ interface WindowManagerClient2 { ...@@ -27,5 +27,3 @@ interface WindowManagerClient2 {
OnFocusChanged(uint32 old_focused_node_id, uint32 new_focused_node_id); OnFocusChanged(uint32 old_focused_node_id, uint32 new_focused_node_id);
OnActiveWindowChanged(uint32 old_focused_window, uint32 new_focused_window); OnActiveWindowChanged(uint32 old_focused_window, uint32 new_focused_window);
}; };
}
...@@ -261,20 +261,5 @@ ...@@ -261,20 +261,5 @@
'../../public/mojo_public.gyp:mojo_cpp_bindings', '../../public/mojo_public.gyp:mojo_cpp_bindings',
], ],
}, },
{
# GN version: //mojo/services/public/interfaces/window_manager2
'target_name': 'mojo_window_manager2_bindings',
'type': 'static_library',
'sources': [
'interfaces/window_manager2/window_manager2.mojom',
],
'includes': [ '../../public/tools/bindings/mojom_bindings_generator.gypi' ],
'export_dependent_settings': [
'../../public/mojo_public.gyp:mojo_cpp_bindings',
],
'dependencies': [
'../../public/mojo_public.gyp:mojo_cpp_bindings',
],
},
], ],
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment