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

Side by Side Diff: extensions/browser/extension_function.h

Issue 885443010: WebstorePrivate extension API cleanup, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testext_permission_prompt
Patch Set: fix Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // by the corresponding |s*|: 301 // by the corresponding |s*|:
302 // Error("Error in *: *", "foo", "bar") <--> Error("Error in foo: bar"). 302 // Error("Error in *: *", "foo", "bar") <--> Error("Error in foo: bar").
303 ResponseValue Error(const std::string& format, const std::string& s1); 303 ResponseValue Error(const std::string& format, const std::string& s1);
304 ResponseValue Error(const std::string& format, 304 ResponseValue Error(const std::string& format,
305 const std::string& s1, 305 const std::string& s1,
306 const std::string& s2); 306 const std::string& s2);
307 ResponseValue Error(const std::string& format, 307 ResponseValue Error(const std::string& format,
308 const std::string& s1, 308 const std::string& s1,
309 const std::string& s2, 309 const std::string& s2,
310 const std::string& s3); 310 const std::string& s3);
311 // Error with a list of arguments |results| to pass to caller. TAKES OWNERSHIP
312 // - a scoped_ptr<> for convenience, since callers usually get this from the
313 // result of a Create(...) call on the generated Results struct, for example,
314 // alarms::Get::Results::Create(alarm).
not at google - send to devlin 2015/02/05 17:16:17 It's funny actually - this ResponseAction/Response
Marc Treib 2015/02/06 10:26:15 Done.
315 ResponseValue ArgumentListWithError(scoped_ptr<base::ListValue> results,
316 const std::string& error);
311 // Bad message. A ResponseValue equivalent to EXTENSION_FUNCTION_VALIDATE(), 317 // Bad message. A ResponseValue equivalent to EXTENSION_FUNCTION_VALIDATE(),
312 // so this will actually kill the renderer and not respond at all. 318 // so this will actually kill the renderer and not respond at all.
313 ResponseValue BadMessage(); 319 ResponseValue BadMessage();
314 320
315 // ResponseActions. 321 // ResponseActions.
316 // 322 //
317 // Respond to the extension immediately with |result|. 323 // Respond to the extension immediately with |result|.
318 ResponseAction RespondNow(ResponseValue result); 324 ResponseAction RespondNow(ResponseValue result);
319 // Don't respond now, but promise to call Respond(...) later. 325 // Don't respond now, but promise to call Respond(...) later.
320 ResponseAction RespondLater(); 326 ResponseAction RespondLater();
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 virtual bool RunSync() = 0; 631 virtual bool RunSync() = 0;
626 632
627 // ValidationFailure override to match RunSync(). 633 // ValidationFailure override to match RunSync().
628 static bool ValidationFailure(SyncIOThreadExtensionFunction* function); 634 static bool ValidationFailure(SyncIOThreadExtensionFunction* function);
629 635
630 private: 636 private:
631 ResponseAction Run() override; 637 ResponseAction Run() override;
632 }; 638 };
633 639
634 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_ 640 #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698