Chromium Code Reviews| Index: generated_files_will_not_submit/permissions_api.h |
| diff --git a/generated_files_will_not_submit/permissions_api.h b/generated_files_will_not_submit/permissions_api.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b066281d10f2b7299bdaa47ff024f2fd9286909a |
| --- /dev/null |
| +++ b/generated_files_will_not_submit/permissions_api.h |
| @@ -0,0 +1,153 @@ |
| +// 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 |
| +// chrome/common/extensions/api/permissions.json |
| +// DO NOT EDIT. |
| + |
| +#ifndef CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_API_H__ |
| +#define CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_API_H__ |
| +#pragma once |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/values.h" |
| + |
| +using base::Value; |
| +using base::DictionaryValue; |
| +using base::ListValue; |
| + |
| +namespace extensions { |
| +namespace permissions_api { |
| + |
| +// |
| +// Types |
| +// |
| + |
| +struct Permissions { |
| + ~Permissions(); |
| + Permissions(); |
| + |
| + // List of origin permissions. |
| + scoped_ptr<std::vector<std::string> > origins; |
| + |
| + // List of named permissions (does not include hosts or origins). |
| + scoped_ptr<std::vector<std::string> > permissions; |
| + |
| + // Populates a Permissions object from a Value. Returns whether |out| was |
| + // successfully populated. |
| + static bool Populate(const Value& value, Permissions* out); |
|
Aaron Boodman
2012/01/19 23:31:13
It seems like it would be more natural to have thi
calamity
2012/01/23 05:14:45
One problem that may arise is that Creating for me
|
| + |
| + // Returns a new DictionaryValue representing the serialized form of this |
| + // Permissions object. |
| + DictionaryValue* ToValue() const; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Permissions); |
| +}; |
| + |
| +// |
| +// Functions |
| +// |
| + |
| +struct Contains { |
|
Aaron Boodman
2012/01/19 23:31:13
Can anything else go in Contains? If not, it is a
calamity
2012/01/23 05:14:45
Done.
|
| + struct Params { |
| + Permissions permissions; |
| + |
| + Params(); |
| + ~Params(); |
| + |
| + static bool Populate(const ListValue& args, Params* out); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Params); |
| + }; |
| + |
| + // True if the extension has the specified permissions. |
| + class Result { |
| + public: |
| + static Value* Create(const bool result); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| +struct GetAll { |
| + struct Params { |
|
Yoyo Zhou
2012/01/19 02:19:40
Can this be omitted?
calamity
2012/01/20 01:10:25
Yeah, it was being generated for consistency.
|
| + }; |
| + |
| + // The extension's active permissions. |
| + class Result { |
| + public: |
| + static Value* Create(const Permissions& permissions); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| +struct Request { |
| + struct Params { |
| + Permissions permissions; |
| + |
| + Params(); |
| + ~Params(); |
| + |
| + static bool Populate(const ListValue& args, Params* out); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Params); |
| + }; |
| + |
| + // True if the user granted the specified permissions. |
| + class Result { |
| + public: |
| + static Value* Create(const bool granted); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| +struct Remove { |
| + struct Params { |
| + Permissions permissions; |
| + |
| + Params(); |
| + ~Params(); |
| + |
| + static bool Populate(const ListValue& args, Params* out); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Params); |
| + }; |
| + |
| + // True if the permissions were removed. |
| + class Result { |
| + public: |
| + static Value* Create(const bool removed); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| + |
| + |
| +} // namespace extensions |
| +} // namespace permissions_api |
| + |
| +#endif // CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_API_H__ |