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

Unified Diff: mojo/public/bindings/sample/generated/sample_service_stub.cc

Issue 23913008: C++ bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows build error. Created 7 years, 2 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/public/bindings/sample/generated/sample_service_stub.cc
diff --git a/mojo/public/bindings/sample/generated/sample_service_stub.cc b/mojo/public/bindings/sample/generated/sample_service_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c26a26d02747ee399b0dd5bcc860971ffa4e1f8c
--- /dev/null
+++ b/mojo/public/bindings/sample/generated/sample_service_stub.cc
@@ -0,0 +1,28 @@
+// Copyright 2013 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.
+
+#include "mojo/public/bindings/sample/generated/sample_service_stub.h"
+
+#include "mojo/public/bindings/sample/generated/sample_service_serialization.h"
+
+namespace sample {
+
+bool ServiceStub::Accept(mojo::Message* message) {
+ switch (message->data->header.name) {
+ case internal::kService_Frobinate_Name: {
+ internal::Service_Frobinate_Params* params =
+ reinterpret_cast<internal::Service_Frobinate_Params*>(
+ message->data->payload);
+
+ if (!mojo::internal::DecodePointersAndHandles(params, *message))
+ return false;
+
+ Frobinate(params->foo(), params->baz(), params->port());
+ break;
+ }
+ }
+ return true;
+}
+
+} // namespace sample
« no previous file with comments | « mojo/public/bindings/sample/generated/sample_service_stub.h ('k') | mojo/public/bindings/sample/sample_service.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698