diff options
author | haibinlu <haibinlu@chromium.org> | 2015-10-15 15:56:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-15 22:57:23 +0000 |
commit | 28516c7ad6686f548c1c7f971b62c5f359f37b53 (patch) | |
tree | 4e1a1aaa6ca2888e240cef5d4229aded0c37bc93 /blimp/common | |
parent | 2ae73f1f9ba61c441949053db0c6bc144e7590fa (diff) | |
download | chromium_src-28516c7ad6686f548c1c7f971b62c5f359f37b53.zip chromium_src-28516c7ad6686f548c1c7f971b62c5f359f37b53.tar.gz chromium_src-28516c7ad6686f548c1c7f971b62c5f359f37b53.tar.bz2 |
[Blimp] Adds Blimp EngineSession and ClientSession skeleton.
BlimpClientSessionManager (to be added) authenticates and creates client sessions. Once a client session is authenticated, it is given to the engine session. There is at most one active client session attached to the engine session.
The engine session manages a list of web contents.
Review URL: https://codereview.chromium.org/1403083002
Cr-Commit-Position: refs/heads/master@{#354388}
Diffstat (limited to 'blimp/common')
-rw-r--r-- | blimp/common/proto/BUILD.gn | 3 | ||||
-rw-r--r-- | blimp/common/proto/blimp_message.proto | 9 | ||||
-rw-r--r-- | blimp/common/proto/client_control.proto | 29 | ||||
-rw-r--r-- | blimp/common/proto/control.proto | 28 | ||||
-rw-r--r-- | blimp/common/proto/server_control.proto | 43 |
5 files changed, 32 insertions, 80 deletions
diff --git a/blimp/common/proto/BUILD.gn b/blimp/common/proto/BUILD.gn index db60779..ecaa29c 100644 --- a/blimp/common/proto/BUILD.gn +++ b/blimp/common/proto/BUILD.gn @@ -14,10 +14,9 @@ group("proto") { proto_library("proto_lib") { sources = [ "blimp_message.proto", - "client_control.proto", "common.proto", "compositor.proto", + "control.proto", "input.proto", - "server_control.proto", ] } diff --git a/blimp/common/proto/blimp_message.proto b/blimp/common/proto/blimp_message.proto index 9472f9e..553119d 100644 --- a/blimp/common/proto/blimp_message.proto +++ b/blimp/common/proto/blimp_message.proto @@ -24,10 +24,9 @@ syntax = "proto2"; option optimize_for = LITE_RUNTIME; -import "client_control.proto"; +import "control.proto"; import "compositor.proto"; import "input.proto"; -import "server_control.proto"; package blimp; @@ -35,8 +34,7 @@ message BlimpMessage { enum Type { COMPOSITOR = 0; INPUT = 1; - CLIENT_CONTROL = 2; - SERVER_CONTROL = 3; + CONTROL = 2; } // Identifies the feature type of this message. // The feature-specific contents are contained in optional fields of the same @@ -59,7 +57,6 @@ message BlimpMessage { // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. optional CompositorMessage compositor = 1000; optional InputMessage input = 1001; - optional ClientControlMessage client_control = 1002; - optional ServerControlMessage server_control = 1003; + optional ControlMessage control = 1002; } diff --git a/blimp/common/proto/client_control.proto b/blimp/common/proto/client_control.proto deleted file mode 100644 index 6d9f605..0000000 --- a/blimp/common/proto/client_control.proto +++ /dev/null @@ -1,29 +0,0 @@ -// 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. -// -// Message definitions for client-originating browser control messages. -// -// Current definitions are just placeholders and are NOT final. -// Feel free to modify this interface as necessary during feature work. - -syntax = "proto2"; - -option optimize_for = LITE_RUNTIME; - -message NavigateArgs { - optional string url = 1; -} - -message ClientControlMessage { - enum Type { - NAVIGATE = 1; - STOP = 2; - RELOAD = 3; - BACK = 4; - FORWARD = 5; - } - optional Type type = 1; - - optional NavigateArgs navigate = 1000; -} diff --git a/blimp/common/proto/control.proto b/blimp/common/proto/control.proto new file mode 100644 index 0000000..fdc1c89 --- /dev/null +++ b/blimp/common/proto/control.proto @@ -0,0 +1,28 @@ +// 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. +// +// Message definitions for browser control messages. + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +message LoadUrlMessage { + optional string url = 1; +} + +message ControlMessage { + enum Type { + // Client <=> Server types. + CREATE_TAB = 1; + CLOSE_TAB = 2; + LOAD_URL = 3; + + // Server => Client types. + // Client => Server types. + } + optional Type type = 1; + + optional LoadUrlMessage load_url = 1000; +} diff --git a/blimp/common/proto/server_control.proto b/blimp/common/proto/server_control.proto deleted file mode 100644 index f1cf976..0000000 --- a/blimp/common/proto/server_control.proto +++ /dev/null @@ -1,43 +0,0 @@ -// 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. -// -// Message definitions for server-originating browser control messages. -// -// Current definitions are just placeholders and are NOT final. -// Feel free to modify this interface as necessary during feature work. - -syntax = "proto2"; - -option optimize_for = LITE_RUNTIME; - -message StatusArgs { - optional string url = 1; - optional int32 loading_progress = 2; - // Add error code, error message, status strings, etc. -} - -message ResetSessionArgs { -} - -message ErrorArgs { - enum ErrorCode { - UNKNOWN = 1; - UNRESPONSIVE = 2; - SERVER_ERROR = 3; - } - - optional ErrorCode error_code = 1; - optional int32 server_error_code = 2; -} - -message ServerControlMessage { - enum Type { - ERROR = 1; - STATUS = 2; - } - optional Type type = 1; - - optional ErrorArgs error = 1000; - optional StatusArgs status = 1001; -} |