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

Unified Diff: mojo/edk/system/node_controller.h

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no bindings Created 4 years, 6 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
« no previous file with comments | « mojo/edk/system/node_channel.cc ('k') | mojo/edk/system/node_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/node_controller.h
diff --git a/mojo/edk/system/node_controller.h b/mojo/edk/system/node_controller.h
index 7c244f6771ff770e2bc108a84d712512ea77aedd..7f1f292fd59a242778b50e0d0ea4c1b7bee3f514 100644
--- a/mojo/edk/system/node_controller.h
+++ b/mojo/edk/system/node_controller.h
@@ -74,7 +74,8 @@ class NodeController : public ports::NodeDelegate,
// Connects this node to a child node. This node will initiate a handshake.
void ConnectToChild(base::ProcessHandle process_handle,
ScopedPlatformHandle platform_handle,
- const std::string& child_token);
+ const std::string& child_token,
+ const ProcessErrorCallback& process_error_callback);
// Closes all reserved ports which associated with the child process
// |child_token|.
@@ -121,6 +122,11 @@ class NodeController : public ports::NodeDelegate,
// transfer.
void RequestShutdown(const base::Closure& callback);
+ // Notifies the NodeController that we received a bad message from the given
+ // node.
+ void NotifyBadMessageFrom(const ports::NodeName& source_node,
+ const std::string& error);
+
private:
friend Core;
@@ -133,9 +139,11 @@ class NodeController : public ports::NodeDelegate,
const std::string child_token;
};
- void ConnectToChildOnIOThread(base::ProcessHandle process_handle,
- ScopedPlatformHandle platform_handle,
- ports::NodeName token);
+ void ConnectToChildOnIOThread(
+ base::ProcessHandle process_handle,
+ ScopedPlatformHandle platform_handle,
+ ports::NodeName token,
+ const ProcessErrorCallback& process_error_callback);
void ConnectToParentOnIOThread(ScopedPlatformHandle platform_handle);
scoped_refptr<NodeChannel> GetPeerChannel(const ports::NodeName& name);
@@ -190,6 +198,9 @@ class NodeController : public ports::NodeDelegate,
base::ProcessHandle from_process,
const ports::NodeName& destination,
Channel::MessagePtr message) override;
+ void OnPortsMessageFromRelay(const ports::NodeName& from_node,
+ const ports::NodeName& source_node,
+ Channel::MessagePtr message) override;
#endif
void OnChannelError(const ports::NodeName& from_node) override;
#if defined(OS_MACOSX) && !defined(OS_IOS)
« no previous file with comments | « mojo/edk/system/node_channel.cc ('k') | mojo/edk/system/node_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698