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

Unified Diff: extensions/renderer/api_last_error.h

Issue 2819683002: [Extenisons Bindings] Don't throw unchecked errors; add console errors (Closed)
Patch Set: jbroman's Created 3 years, 8 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 | « extensions/renderer/api_bindings_system_unittest.cc ('k') | extensions/renderer/api_last_error.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_last_error.h
diff --git a/extensions/renderer/api_last_error.h b/extensions/renderer/api_last_error.h
index 95126fe62fc5e148a695c0c32fb811985708cb85..686adcc9ca789dcd8eedf2b612292ec16e0b160e 100644
--- a/extensions/renderer/api_last_error.h
+++ b/extensions/renderer/api_last_error.h
@@ -21,8 +21,12 @@ class APILastError {
// given context.
using GetParent =
base::Callback<v8::Local<v8::Object>(v8::Local<v8::Context>)>;
+ // Adds an error message to the context's console.
+ using AddConsoleError =
+ base::Callback<void(v8::Local<v8::Context>, const std::string& error)>;
- explicit APILastError(const GetParent& get_parent);
+ APILastError(const GetParent& get_parent,
+ const AddConsoleError& add_console_error);
APILastError(APILastError&& other);
~APILastError();
@@ -39,6 +43,8 @@ class APILastError {
private:
GetParent get_parent_;
+ AddConsoleError add_console_error_;
+
DISALLOW_COPY_AND_ASSIGN(APILastError);
};
« no previous file with comments | « extensions/renderer/api_bindings_system_unittest.cc ('k') | extensions/renderer/api_last_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698