1 // Copyright (c) 2010 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.
5 #ifndef CHROME_RENDERER_SEARCHBOX_EXTENSION_H_
6 #define CHROME_RENDERER_SEARCHBOX_EXTENSION_H_
9 #include "base/basictypes.h"
19 namespace extensions_v8
{
21 // Reference implementation of the SearchBox API as described in:
22 // http://dev.chromium.org/searchbox
23 class SearchBoxExtension
{
25 // Returns the v8::Extension object handling searchbox bindings. Returns null
26 // if match-preview is not enabled. Caller takes ownership of returned object.
27 static v8::Extension
* Get();
29 static void DispatchChange(WebKit::WebFrame
* frame
);
30 static void DispatchSubmit(WebKit::WebFrame
* frame
);
31 static void DispatchCancel(WebKit::WebFrame
* frame
);
32 static void DispatchResize(WebKit::WebFrame
* frame
);
34 static bool PageSupportsInstant(WebKit::WebFrame
* frame
);
37 DISALLOW_COPY_AND_ASSIGN(SearchBoxExtension
);
40 } // namespace extensions_v8
42 #endif // CHROME_RENDERER_SEARCHBOX_EXTENSION_H_