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

Unified Diff: mojo/public/bindings/sample/generated/sample_service_serialization.h

Issue 60803002: Simpler bindings, fewer files! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move more to the .cc file Created 7 years, 1 month 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_serialization.h
diff --git a/mojo/public/bindings/sample/generated/sample_service_serialization.h b/mojo/public/bindings/sample/generated/sample_service_serialization.h
deleted file mode 100644
index 5a7044b81153d7200b6ecff2c6648999a9913e0e..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/sample/generated/sample_service_serialization.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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.
-
-#ifndef MOJO_GENERATED_BINDINGS_SAMPLE_SERVICE_SERIALIZATION_H_
-#define MOJO_GENERATED_BINDINGS_SAMPLE_SERVICE_SERIALIZATION_H_
-
-#include <string.h>
-
-#include "mojo/public/bindings/lib/bindings_serialization.h"
-#include "mojo/public/bindings/sample/generated/sample_foo_serialization.h"
-#include "mojo/public/bindings/sample/generated/sample_service.h"
-
-namespace sample {
-namespace internal {
-
-const uint32_t kService_Frobinate_Name = 1;
-
-#pragma pack(push, 1)
-
-class Service_Frobinate_Params {
- public:
- static Service_Frobinate_Params* New(mojo::Buffer* buf);
-
- void set_foo(Foo* foo) { foo_.ptr = foo; }
- void set_baz(bool baz) { baz_ = baz; }
- void set_port(mojo::Handle port) { port_ = port; }
-
- const Foo* foo() const { return foo_.ptr; }
- bool baz() const { return baz_; }
- mojo::Handle port() const {
- // NOTE: port is an optional field!
- return _header_.num_fields >= 3 ? port_ : mojo::kInvalidHandle;
- }
-
- private:
- friend class mojo::internal::ObjectTraits<Service_Frobinate_Params>;
-
- Service_Frobinate_Params();
- ~Service_Frobinate_Params(); // NOT IMPLEMENTED
-
- mojo::internal::StructHeader _header_;
- mojo::internal::StructPointer<Foo> foo_;
- uint8_t baz_ : 1;
- uint8_t _pad0_[3];
- mojo::Handle port_;
-};
-MOJO_COMPILE_ASSERT(sizeof(Service_Frobinate_Params) == 24,
- bad_sizeof_Service_Frobinate_Params);
-
-#pragma pack(pop)
-
-} // namespace internal
-} // namespace sample
-
-namespace mojo {
-namespace internal {
-
-template <>
-class ObjectTraits<sample::internal::Service_Frobinate_Params> {
- public:
- static void EncodePointersAndHandles(
- sample::internal::Service_Frobinate_Params* params,
- std::vector<mojo::Handle>* handles);
- static bool DecodePointersAndHandles(
- sample::internal::Service_Frobinate_Params* params,
- const mojo::Message& message);
-};
-
-} // namespace internal
-} // namespace mojo
-
-#endif // MOJO_GENERATED_BINDINGS_SAMPLE_SERVICE_SERIALIZATION_H_

Powered by Google App Engine
This is Rietveld 408576698