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

Side by Side Diff: chrome/renderer/extensions/bindings_utils.h

Issue 173034: Validation of extension api callback and event parameters in DEBUG (Closed)
Patch Set: build docs Created 11 years, 4 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_
6 #define CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ 6 #define CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_
7 7
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/linked_ptr.h" 9 #include "base/linked_ptr.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // Returns a mutable reference to the PendingRequestMap. 100 // Returns a mutable reference to the PendingRequestMap.
101 PendingRequestMap& GetPendingRequestMap(); 101 PendingRequestMap& GetPendingRequestMap();
102 102
103 // Returns the current RenderView, based on which V8 context is current. It is 103 // Returns the current RenderView, based on which V8 context is current. It is
104 // an error to call this when not in a V8 context. 104 // an error to call this when not in a V8 context.
105 RenderView* GetRenderViewForCurrentContext(); 105 RenderView* GetRenderViewForCurrentContext();
106 106
107 // Call the named javascript function with the given arguments in a context. 107 // Call the named javascript function with the given arguments in a context.
108 // The function name should be reachable from the chromeHidden object, and can 108 // The function name should be reachable from the chromeHidden object, and can
109 // be a sub-property like "Port.dispatchOnMessage". 109 // be a sub-property like "Port.dispatchOnMessage". Returns the result of
110 void CallFunctionInContext(v8::Handle<v8::Context> context, 110 // the function call. If an exception is thrown an empty Handle will be
111 const std::string& function_name, int argc, 111 // returned.
112 v8::Handle<v8::Value>* argv); 112 v8::Handle<v8::Value> CallFunctionInContext(v8::Handle<v8::Context> context,
113 const std::string& function_name, int argc,
114 v8::Handle<v8::Value>* argv);
113 115
114 } // namespace bindings_utils 116 } // namespace bindings_utils
115 117
116 #endif // CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_ 118 #endif // CHROME_RENDERER_EXTENSIONS_BINDINGS_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/windows.html ('k') | chrome/renderer/extensions/bindings_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698