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

Side by Side Diff: chrome/browser/bookmarks/bookmark_extension_api.h

Issue 8491033: Extension Settings API: throttle the API in the same way that the Bookmarks API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 class RemoveBookmarkFunction : public BookmarksFunction { 146 class RemoveBookmarkFunction : public BookmarksFunction {
147 public: 147 public:
148 // Returns true on successful parse and sets invalid_id to true if conversion 148 // Returns true on successful parse and sets invalid_id to true if conversion
149 // from id string to int64 failed. 149 // from id string to int64 failed.
150 static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids, 150 static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
151 bool* invalid_id); 151 bool* invalid_id);
152 // BookmarksFunction: 152 // BookmarksFunction:
153 virtual bool RunImpl() OVERRIDE; 153 virtual bool RunImpl() OVERRIDE;
154 virtual void GetQuotaLimitHeuristics( 154 virtual void GetQuotaLimitHeuristics(
155 std::list<QuotaLimitHeuristic*>* heuristics) const; 155 QuotaLimitHeuristics* heuristics) const OVERRIDE;
156 156
157 private: 157 private:
158 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.remove") 158 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.remove")
159 }; 159 };
160 160
161 class RemoveTreeBookmarkFunction : public RemoveBookmarkFunction { 161 class RemoveTreeBookmarkFunction : public RemoveBookmarkFunction {
162 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.removeTree") 162 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.removeTree")
163 }; 163 };
164 164
165 class CreateBookmarkFunction : public BookmarksFunction { 165 class CreateBookmarkFunction : public BookmarksFunction {
166 public: 166 public:
167 virtual void GetQuotaLimitHeuristics( 167 virtual void GetQuotaLimitHeuristics(
168 std::list<QuotaLimitHeuristic*>* heuristics) const; 168 QuotaLimitHeuristics* heuristics) const OVERRIDE;
169 // BookmarksFunction: 169 // BookmarksFunction:
170 virtual bool RunImpl() OVERRIDE; 170 virtual bool RunImpl() OVERRIDE;
171 171
172 private: 172 private:
173 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.create") 173 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.create")
174 }; 174 };
175 175
176 class MoveBookmarkFunction : public BookmarksFunction { 176 class MoveBookmarkFunction : public BookmarksFunction {
177 public: 177 public:
178 static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids, 178 static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
179 bool* invalid_id); 179 bool* invalid_id);
180 virtual void GetQuotaLimitHeuristics( 180 virtual void GetQuotaLimitHeuristics(
181 std::list<QuotaLimitHeuristic*>* heuristics) const; 181 QuotaLimitHeuristics* heuristics) const OVERRIDE;
182 // BookmarksFunction: 182 // BookmarksFunction:
183 virtual bool RunImpl() OVERRIDE; 183 virtual bool RunImpl() OVERRIDE;
184 184
185 private: 185 private:
186 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.move") 186 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.move")
187 }; 187 };
188 188
189 class UpdateBookmarkFunction : public BookmarksFunction { 189 class UpdateBookmarkFunction : public BookmarksFunction {
190 public: 190 public:
191 static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids, 191 static bool ExtractIds(const base::ListValue* args, std::list<int64>* ids,
192 bool* invalid_id); 192 bool* invalid_id);
193 virtual void GetQuotaLimitHeuristics( 193 virtual void GetQuotaLimitHeuristics(
194 std::list<QuotaLimitHeuristic*>* heuristics) const; 194 QuotaLimitHeuristics* heuristics) const OVERRIDE;
195 virtual bool RunImpl(); 195 virtual bool RunImpl();
196 private: 196 private:
197 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.update") 197 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.update")
198 }; 198 };
199 199
200 class BookmarksIOFunction : public BookmarksFunction, 200 class BookmarksIOFunction : public BookmarksFunction,
201 public SelectFileDialog::Listener { 201 public SelectFileDialog::Listener {
202 public: 202 public:
203 BookmarksIOFunction(); 203 BookmarksIOFunction();
204 virtual ~BookmarksIOFunction(); 204 virtual ~BookmarksIOFunction();
(...skipping 30 matching lines...) Expand all
235 // BookmarkManagerIOFunction: 235 // BookmarkManagerIOFunction:
236 virtual bool RunImpl() OVERRIDE; 236 virtual bool RunImpl() OVERRIDE;
237 virtual void FileSelected(const FilePath& path, int index, void* params) 237 virtual void FileSelected(const FilePath& path, int index, void* params)
238 OVERRIDE; 238 OVERRIDE;
239 239
240 private: 240 private:
241 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export"); 241 DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export");
242 }; 242 };
243 243
244 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_ 244 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_EXTENSION_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698