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

Unified Diff: generated_files_will_not_submit/simple_api.h

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework, add a couple of tests Created 8 years, 10 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 | « generated_files_will_not_submit/permissions.cc ('k') | generated_files_will_not_submit/simple_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: generated_files_will_not_submit/simple_api.h
diff --git a/generated_files_will_not_submit/simple_api.h b/generated_files_will_not_submit/simple_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2c27d0621678ce512544e88a02ff712f583bab6
--- /dev/null
+++ b/generated_files_will_not_submit/simple_api.h
@@ -0,0 +1,125 @@
+// Copyright (c) 2012 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.
+
+// GENERATED FROM THE API DEFINITION IN
+// tools/json_schema_compiler/test/simple_api.json
+// DO NOT EDIT.
+
+#ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_SIMPLE_API_H__
+#define TOOLS_JSON_SCHEMA_COMPILER_TEST_SIMPLE_API_H__
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/memory/linked_ptr.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
+
+namespace test {
+namespace api {
+namespace simple_api {
+
+//
+// Types
+//
+
+struct TestType {
+ ~TestType();
+ TestType();
+
+ // Some integer.
+ int integer;
+
+ // Some boolean.
+ bool boolean;
+
+ // Some string.
+ std::string string;
+
+ // Some double.
+ double number;
+
+ // Populates a TestType object from a Value. Returns whether |out| was
+ // successfully populated.
+ static bool Populate(const Value& value, TestType* out);
+
+ // Returns a new DictionaryValue representing the serialized form of this
+ // TestType object. Passes ownership to caller.
+ scoped_ptr<DictionaryValue> ToValue() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TestType);
+};
+
+//
+// Functions
+//
+
+namespace OptionalString {
+ struct Params {
+ scoped_ptr<std::string> str;
+
+ ~Params();
+
+ static scoped_ptr<Params> Create(const ListValue& args);
+
+ private:
+ Params();
+
+ DISALLOW_COPY_AND_ASSIGN(Params);
+ };
+
+ namespace Result {
+ Value* Create();
+ };
+
+};
+
+namespace GetTestType {
+
+ namespace Result {
+ // A TestType.
+ Value* Create(const TestType& result);
+ };
+
+};
+
+namespace OptionalCallbackParams {
+
+ namespace Result {
+ // True if the extension has the specified permissions.
+ Value* Create(const TestType& result);
+ };
+
+};
+
+namespace IncrementInteger {
+ struct Params {
+ int num;
+
+ ~Params();
+
+ static scoped_ptr<Params> Create(const ListValue& args);
+
+ private:
+ Params();
+
+ DISALLOW_COPY_AND_ASSIGN(Params);
+ };
+
+ namespace Result {
+ // The incremented value.
+ Value* Create(const int result);
+ };
+
+};
+
+
+} // simple_api
+} // api
+} // test
+
+#endif // TOOLS_JSON_SCHEMA_COMPILER_TEST_SIMPLE_API_H__
« no previous file with comments | « generated_files_will_not_submit/permissions.cc ('k') | generated_files_will_not_submit/simple_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698