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

Side by Side Diff: chrome/renderer/external_js_object.h

Issue 99168: Replace window.external with a v8::extension. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | chrome/renderer/external_js_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /*
6 ExternalJSObject class:
7 Bound to a JavaScript window.external object using
8 CppBoundClass::BindToJavascript(), this adds methods accessible from JS for
9 compatibility with other browsers.
10 */
11
12 #ifndef CHROME_RENDERER_EXTERNAL_JS_OBJECT_H__
13 #define CHROME_RENDERER_EXTERNAL_JS_OBJECT_H__
14
15 #include "base/basictypes.h"
16 #include "webkit/glue/cpp_bound_class.h"
17
18 class RenderView;
19
20 class ExternalJSObject : public CppBoundClass {
21 public:
22 // Builds the property and method lists needed to bind this class to a JS
23 // object.
24 ExternalJSObject();
25
26 // A RenderView must be set before AddSearchProvider is called, or the call
27 // will do nothing.
28 void set_render_view(RenderView* rv) { render_view_ = rv; }
29
30 // Given a URL to an OpenSearch document in the first argument, adds the
31 // corresponding search provider as a keyword search. The nonstandard
32 // capitalization is for compatibility with Firefox and IE.
33 void AddSearchProvider(const CppArgumentList& args, CppVariant* result);
34
35 private:
36 RenderView* render_view_;
37
38 DISALLOW_EVIL_CONSTRUCTORS(ExternalJSObject);
39 };
40
41 #endif // CHROME_RENDERER_EXTERNAL_JS_OBJECT_H__
OLDNEW
« no previous file with comments | « chrome/renderer/external_extension.cc ('k') | chrome/renderer/external_js_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698