Commit 1a5032f4 authored by Tom McKee's avatar Tom McKee Committed by Commit Bot

Small fixes for Mojo docs

Change-Id: I5c9b07a3252a6cc3c303c8da3ccd2252be72d242
Reviewed-on: https://chromium-review.googlesource.com/1158717
Commit-Queue: Tom McKee <tommckee@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580221}
parent f5edd71e
...@@ -15,7 +15,7 @@ that message on the other endpoint. Message pipes are thus bidirectional. ...@@ -15,7 +15,7 @@ that message on the other endpoint. Message pipes are thus bidirectional.
A **mojom** file describes **interfaces** which describe strongly typed message A **mojom** file describes **interfaces** which describe strongly typed message
structures, similar to proto files. structures, similar to proto files.
Given a **mojom interface** and a **message pipe**, the two **message pipes** Given a **mojom interface** and a **message pipe**, the two **endpoints**
can be given the labels **InterfacePtr** and **Binding**. This now describes a can be given the labels **InterfacePtr** and **Binding**. This now describes a
strongly typed **message pipe** which transports messages described by the strongly typed **message pipe** which transports messages described by the
**mojom interface**. The **InterfacePtr** is the **endpoint** which "sends" **mojom interface**. The **InterfacePtr** is the **endpoint** which "sends"
......
...@@ -669,7 +669,7 @@ For example, consider the following Mojom definitions: ...@@ -669,7 +669,7 @@ For example, consider the following Mojom definitions:
```cpp ```cpp
union Value { union Value {
int64 int_value; int64 int_value;
float32 float_value; float float_value;
string string_value; string string_value;
}; };
...@@ -678,12 +678,17 @@ interface Dictionary { ...@@ -678,12 +678,17 @@ interface Dictionary {
}; };
``` ```
This generates a the following C++ interface: This generates the following C++ interface:
```cpp ```cpp
class Value { class Value {
public: public:
virtual ~Value() {} ~Value() {}
};
class Dictionary {
public:
virtual ~Dictionary() {}
virtual void AddValue(const std::string& key, ValuePtr value) = 0; virtual void AddValue(const std::string& key, ValuePtr value) = 0;
}; };
......
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