| Index: chrome/renderer/contextualsearch/contextual_search_wrapper.h
|
| diff --git a/chrome/renderer/contextualsearch/contextual_search_wrapper.h b/chrome/renderer/contextualsearch/contextual_search_wrapper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a1a9951f2de4141b383bcdbea78e477908a4a3d8
|
| --- /dev/null
|
| +++ b/chrome/renderer/contextualsearch/contextual_search_wrapper.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_RENDERER_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_WRAPPER_H_
|
| +#define CHROME_RENDERER_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_WRAPPER_H_
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "gin/wrappable.h"
|
| +
|
| +namespace blink {
|
| +class WebFrame;
|
| +}
|
| +
|
| +namespace gin {
|
| +class Arguments;
|
| +}
|
| +
|
| +namespace search {
|
| +
|
| +// Wrapper for injecting Contextual Search JavaScript
|
| +// into a WebFrame.
|
| +class ContextualSearchWrapper : public gin::Wrappable<ContextualSearchWrapper> {
|
| + public:
|
| + // Installs Contextual Search JavaScript.
|
| + static void Install(blink::WebFrame* frame);
|
| +
|
| + // Required by gin::Wrappable.
|
| + static gin::WrapperInfo kWrapperInfo;
|
| +
|
| + private:
|
| + // Intantiate by calling Install.
|
| + ContextualSearchWrapper();
|
| + ~ContextualSearchWrapper() override;
|
| +
|
| + // gin::Wrappable.
|
| + gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
| + v8::Isolate* isolate) final;
|
| +
|
| + // Called by JavaScript to set the caption.
|
| + void SetCaption(const std::string& caption);
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ContextualSearchWrapper);
|
| +};
|
| +
|
| +} // namespace search
|
| +
|
| +#endif // CHROME_RENDERER_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_WRAPPER_H_
|
|
|