OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_CONTEXTUAL_SEARCH_WRAPPER_H_ | 5 #ifndef COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_CONTEXTUAL_SEARCH_WRAPPER_H_ |
6 #define COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_CONTEXTUAL_SEARCH_WRAPPER_H_ | 6 #define COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_CONTEXTUAL_SEARCH_WRAPPER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/contextual_search/common/contextual_search_js_api_service.m
ojom.h" | 9 #include "components/contextual_search/common/contextual_search_js_api_service.m
ojom.h" |
10 #include "content/public/renderer/render_frame.h" | 10 #include "content/public/renderer/render_frame.h" |
11 #include "content/public/renderer/render_frame_observer.h" | 11 #include "content/public/renderer/render_frame_observer.h" |
12 #include "gin/handle.h" | 12 #include "gin/handle.h" |
13 #include "gin/wrappable.h" | 13 #include "gin/wrappable.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 class WebFrame; | 16 class WebFrame; |
17 } | 17 } |
18 | 18 |
19 namespace gin { | |
20 class Arguments; | |
21 } | |
22 | |
23 namespace contextual_search { | 19 namespace contextual_search { |
24 | 20 |
25 // Wrapper for injecting Contextual Search JavaScript | 21 // Wrapper for injecting Contextual Search JavaScript |
26 // into a WebFrame. | 22 // into a WebFrame. |
27 class ContextualSearchWrapper : public gin::Wrappable<ContextualSearchWrapper>, | 23 class ContextualSearchWrapper : public gin::Wrappable<ContextualSearchWrapper>, |
28 public content::RenderFrameObserver { | 24 public content::RenderFrameObserver { |
29 public: | 25 public: |
30 // Installs Contextual Search JavaScript. | 26 // Installs Contextual Search JavaScript. |
31 static void Install(content::RenderFrame* render_frame); | 27 static void Install(content::RenderFrame* render_frame); |
32 | 28 |
(...skipping 23 matching lines...) Expand all Loading... |
56 | 52 |
57 // The service to notify when API calls are made. | 53 // The service to notify when API calls are made. |
58 mojom::ContextualSearchJsApiServicePtr contextual_search_js_api_service_; | 54 mojom::ContextualSearchJsApiServicePtr contextual_search_js_api_service_; |
59 | 55 |
60 DISALLOW_COPY_AND_ASSIGN(ContextualSearchWrapper); | 56 DISALLOW_COPY_AND_ASSIGN(ContextualSearchWrapper); |
61 }; | 57 }; |
62 | 58 |
63 } // namespace contextual_search | 59 } // namespace contextual_search |
64 | 60 |
65 #endif // COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_CONTEXTUAL_SEARCH_WRAPPER_H_ | 61 #endif // COMPONENTS_CONTEXTUAL_SEARCH_RENDERER_CONTEXTUAL_SEARCH_WRAPPER_H_ |
OLD | NEW |