Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4388)

Unified Diff: mojo/services/public/interfaces/view_manager/view_manager.mojom

Issue 383293002: Start of adding enums for error codes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/interfaces/view_manager/view_manager.mojom
diff --git a/mojo/services/public/interfaces/view_manager/view_manager.mojom b/mojo/services/public/interfaces/view_manager/view_manager.mojom
index afa0ccf5938a9248d5cb164a2ebb3b18b0cac4b0..f1121b61dca69cd50be7c216d27d0fc9bd9cf501 100644
--- a/mojo/services/public/interfaces/view_manager/view_manager.mojom
+++ b/mojo/services/public/interfaces/view_manager/view_manager.mojom
@@ -16,6 +16,13 @@ struct NodeData {
// TODO(sky): add visible.
};
+enum ErrorCode {
+ ERROR_CODE_NONE,
+ ERROR_CODE_VALUE_IN_USE,
+ ERROR_CODE_ILLEGAL_ARGUMENT,
+ ERROR_CODE_UNEXPECTED_CHANGE_ID,
+};
+
// ViewManagerInitService is responsible for launching the client that controls
// the root node. mojo::view_manager returns an instance of this. All other
// connections are established by the client this creates.
@@ -39,7 +46,11 @@ interface ViewManagerService {
// the id is unique to the connection (the id need not be globally unique).
// Additionally the connection id (embedded in |node_id|) must match that of
// the connection.
- CreateNode(uint32 node_id) => (bool success);
+ // Errors:
+ // ERROR_CODE_VALUE_IN_USE: a node already exists with the specified id.
+ // ERROR_CODE_ILLEGAL_ARGUMENT: The connection part of |node_id| does not
+ // match the connection id of the client.
+ CreateNode(uint32 node_id) => (ErrorCode error_code);
// Deletes a node. This does not recurse. No hierarchy change notifications
// are sent as a result of this. Only the connection that created the node can

Powered by Google App Engine
This is Rietveld 408576698