summaryrefslogtreecommitdiffstats
path: root/blimp/common
diff options
context:
space:
mode:
authordtrainor <dtrainor@chromium.org>2015-11-30 16:53:05 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-01 00:54:00 +0000
commit160f8eca573286f3bb369975ac2e9de63b0cc477 (patch)
tree3a416ada921c22f0f3902badd415af17ba73a73c /blimp/common
parent7f3d85b096f66870a15b37c2f40b219b2e292693 (diff)
downloadchromium_src-160f8eca573286f3bb369975ac2e9de63b0cc477.zip
chromium_src-160f8eca573286f3bb369975ac2e9de63b0cc477.tar.gz
chromium_src-160f8eca573286f3bb369975ac2e9de63b0cc477.tar.bz2
Add glue between the client and engine for Blimp
- Add BlimpMessageProcessors to handle RENDER_WIDGET, INPUT, and COMPOSITOR message types to/from the client and engine. - Tie the message processors into BlimpCompositor on the client and BlimpEngineSession on the server. - Update BlimpView and BlimpCompositor to fix how we handle output surfaces and how we shut down and build the LayerTreeHost based on incoming RENDER_WIDGET and COMPOSITOR messages. BUG=550693 Review URL: https://codereview.chromium.org/1450423002 Cr-Commit-Position: refs/heads/master@{#362299}
Diffstat (limited to 'blimp/common')
-rw-r--r--blimp/common/proto/BUILD.gn3
-rw-r--r--blimp/common/proto/blimp_message.proto20
-rw-r--r--blimp/common/proto/compositor.proto9
-rw-r--r--blimp/common/proto/control.proto12
-rw-r--r--blimp/common/proto/input.proto5
-rw-r--r--blimp/common/proto/render_widget.proto23
-rw-r--r--blimp/common/proto/size.proto (renamed from blimp/common/proto/common.proto)10
7 files changed, 62 insertions, 20 deletions
diff --git a/blimp/common/proto/BUILD.gn b/blimp/common/proto/BUILD.gn
index 5ca8283..fa564eb 100644
--- a/blimp/common/proto/BUILD.gn
+++ b/blimp/common/proto/BUILD.gn
@@ -26,11 +26,12 @@ proto_library("proto_internal") {
sources = [
"blimp_message.proto",
- "common.proto",
"compositor.proto",
"control.proto",
"input.proto",
"navigation.proto",
+ "render_widget.proto",
+ "size.proto",
]
cc_generator_options = "dllexport_decl=BLIMP_PROTO_EXPORT:"
diff --git a/blimp/common/proto/blimp_message.proto b/blimp/common/proto/blimp_message.proto
index 9b11684..505e0f4 100644
--- a/blimp/common/proto/blimp_message.proto
+++ b/blimp/common/proto/blimp_message.proto
@@ -18,7 +18,6 @@
// * Features are applied to unidirectional channels. Client->server and
// server->client channels for a component should be broken out as distinct
// features, even if they are conceptually similar.
-// * Shared proto types are contained in 'common.proto'.
syntax = "proto2";
@@ -28,16 +27,18 @@ import "control.proto";
import "compositor.proto";
import "input.proto";
import "navigation.proto";
+import "render_widget.proto";
package blimp;
message BlimpMessage {
enum Type {
UNKNOWN = 0;
- COMPOSITOR = 1;
- INPUT = 2;
- CONTROL = 3;
- NAVIGATION = 4;
+ CONTROL = 1;
+ NAVIGATION = 2;
+ RENDER_WIDGET = 3;
+ INPUT = 4;
+ COMPOSITOR = 5;
}
// Identifies the feature type of this message.
// The feature-specific contents are contained in optional fields of the same
@@ -58,9 +59,10 @@ message BlimpMessage {
// Feature-specific messages follow.
// Only one of these fields may be set per BlimpMessage.
// TODO(kmarshall): use a 'oneof' union when it's supported in Chromium.
- optional CompositorMessage compositor = 1000;
- optional InputMessage input = 1001;
- optional ControlMessage control = 1002;
- optional NavigationMessage navigation = 1003;
+ optional ControlMessage control = 1000;
+ optional NavigationMessage navigation = 1001;
+ optional RenderWidgetMessage render_widget = 1002;
+ optional InputMessage input = 1003;
+ optional CompositorMessage compositor = 1004;
}
diff --git a/blimp/common/proto/compositor.proto b/blimp/common/proto/compositor.proto
index bd5f826..a015c24 100644
--- a/blimp/common/proto/compositor.proto
+++ b/blimp/common/proto/compositor.proto
@@ -4,8 +4,6 @@
//
// Message definitions for the compositor subprotocol.
-// TODO(nyquist): Import cc proto files.
-
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
@@ -13,6 +11,11 @@ option optimize_for = LITE_RUNTIME;
package blimp;
message CompositorMessage {
- // TODO(nyquist): Include the cc proto message here.
+ // An ID that corresponds to RenderWidgetMessage.render_widget_id.
+ optional uint32 render_widget_id = 1;
+
+ // This represents a serialized CompositorMessage in
+ // cc/proto/compositor_message.proto.
+ optional bytes payload = 2;
}
diff --git a/blimp/common/proto/control.proto b/blimp/common/proto/control.proto
index bcb9aaa..1a909b6 100644
--- a/blimp/common/proto/control.proto
+++ b/blimp/common/proto/control.proto
@@ -8,6 +8,10 @@ syntax = "proto2";
option optimize_for = LITE_RUNTIME;
+import "size.proto";
+
+package blimp;
+
message ControlMessage {
enum Type {
UNKNOWN = 0;
@@ -15,6 +19,14 @@ message ControlMessage {
// Client <=> Server types.
CREATE_TAB = 1;
CLOSE_TAB = 2;
+
+ // Client => Server types.
+ SIZE = 3;
}
+
optional Type type = 1;
+
+ // Feature-specific messages follow.
+ // Only one of these fields may be set per ControlMessage.
+ optional SizeMessage resize = 1000;
}
diff --git a/blimp/common/proto/input.proto b/blimp/common/proto/input.proto
index fa6fe62..7b9a404 100644
--- a/blimp/common/proto/input.proto
+++ b/blimp/common/proto/input.proto
@@ -11,8 +11,6 @@ syntax = "proto2";
option optimize_for = LITE_RUNTIME;
-import "common.proto";
-
package blimp;
message GestureCommon {
@@ -78,6 +76,9 @@ message InputMessage {
optional Type type = 1;
+ // An ID that corresponds to RenderWidgetMessage.render_widget_id.
+ optional uint32 render_widget_id = 10;
+
// Seconds since client platform start (boot) with millisecond resolution.
// On Android, this is based off of the client's SystemClock#uptimeMillis().
optional double timestamp_seconds = 2;
diff --git a/blimp/common/proto/render_widget.proto b/blimp/common/proto/render_widget.proto
new file mode 100644
index 0000000..480371b
--- /dev/null
+++ b/blimp/common/proto/render_widget.proto
@@ -0,0 +1,23 @@
+// Copyright 2015 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.
+//
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package blimp;
+
+message RenderWidgetMessage {
+ enum Type {
+ // TODO(dtrainor): Leaving this a bit open in case we need to send other
+ // types of RenderWidget messages (like shutdown).
+
+ // Engine => Client types.
+ INITIALIZE = 1;
+ }
+
+ optional Type type = 1;
+ optional uint32 render_widget_id = 2;
+} \ No newline at end of file
diff --git a/blimp/common/proto/common.proto b/blimp/common/proto/size.proto
index 578c02b..f6ba801 100644
--- a/blimp/common/proto/common.proto
+++ b/blimp/common/proto/size.proto
@@ -1,8 +1,6 @@
// Copyright 2015 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.
-//
-// Common message types for sharing across Blimp subprotocols.
syntax = "proto2";
@@ -10,8 +8,10 @@ option optimize_for = LITE_RUNTIME;
package blimp;
-message CoordinatePair {
- optional sint32 x = 1;
- optional sint32 y = 2;
+// Contains display information that represents resize events coming from the
+// client device.
+message SizeMessage {
+ optional uint64 width = 1;
+ optional uint64 height = 2;
}