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

Side by Side Diff: chrome/renderer/contextualsearch/contextual_search_wrapper.h

Issue 1385663002: [Contextual Search] Add Mojo-enabled API component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Kausalya's comments, added TODO and bug reference for transition from JS to a better way. Created 5 years, 2 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
(Empty)
1 // Copyright 2015 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 #ifndef CHROME_RENDERER_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_WRAPPER_H_
6 #define CHROME_RENDERER_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_WRAPPER_H_
7
8 #include "base/basictypes.h"
9 #include "gin/wrappable.h"
10
11 namespace blink {
12 class WebFrame;
13 }
14
15 namespace gin {
16 class Arguments;
17 }
18
19 namespace search {
20
21 // Wrapper for injecting Contextual Search JavaScript
22 // into a WebFrame.
23 class ContextualSearchWrapper : public gin::Wrappable<ContextualSearchWrapper> {
24 public:
25 // Installs Contextual Search JavaScript.
26 static void Install(blink::WebFrame* frame);
27
28 // Required by gin::Wrappable.
29 static gin::WrapperInfo kWrapperInfo;
30
31 private:
32 // Intantiate by calling Install.
33 ContextualSearchWrapper();
34 ~ContextualSearchWrapper() override;
35
36 // gin::Wrappable.
37 gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
38 v8::Isolate* isolate) final;
39
40 // Called by JavaScript to set the caption.
41 void SetCaption(const std::string& caption);
42
43 DISALLOW_COPY_AND_ASSIGN(ContextualSearchWrapper);
44 };
45
46 } // namespace search
47
48 #endif // CHROME_RENDERER_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698