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_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE_IM
PL_H_ | 5 #ifndef COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE_IM
PL_H_ |
6 #define COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE_IM
PL_H_ | 6 #define COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE_IM
PL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/contextual_search/browser/contextual_search_js_api_handler.
h" | 9 #include "components/contextual_search/browser/contextual_search_js_api_handler.
h" |
10 #include "components/contextual_search/common/contextual_search_js_api_service.m
ojom.h" | 10 #include "components/contextual_search/common/contextual_search_js_api_service.m
ojom.h" |
11 | 11 |
| 12 namespace service_manager { |
| 13 struct BindSourceInfo; |
| 14 } |
| 15 |
12 namespace contextual_search { | 16 namespace contextual_search { |
13 | 17 |
14 // This is the receiving end of Contextual Search JavaScript API calls. | 18 // This is the receiving end of Contextual Search JavaScript API calls. |
15 class ContextualSearchJsApiServiceImpl | 19 class ContextualSearchJsApiServiceImpl |
16 : public mojom::ContextualSearchJsApiService { | 20 : public mojom::ContextualSearchJsApiService { |
17 public: | 21 public: |
18 explicit ContextualSearchJsApiServiceImpl( | 22 explicit ContextualSearchJsApiServiceImpl( |
19 ContextualSearchJsApiHandler* contextual_search_js_api_handler); | 23 ContextualSearchJsApiHandler* contextual_search_js_api_handler); |
20 ~ContextualSearchJsApiServiceImpl() override; | 24 ~ContextualSearchJsApiServiceImpl() override; |
21 | 25 |
22 // Mojo ContextualSearchApiService implementation. | 26 // Mojo ContextualSearchApiService implementation. |
23 void HandleSetCaption(const std::string& message, bool does_answer) override; | 27 void HandleSetCaption(const std::string& message, bool does_answer) override; |
24 | 28 |
25 private: | 29 private: |
26 // The UI handler for calls through the JavaScript API. | 30 // The UI handler for calls through the JavaScript API. |
27 ContextualSearchJsApiHandler* contextual_search_js_api_handler_; | 31 ContextualSearchJsApiHandler* contextual_search_js_api_handler_; |
28 | 32 |
29 DISALLOW_COPY_AND_ASSIGN(ContextualSearchJsApiServiceImpl); | 33 DISALLOW_COPY_AND_ASSIGN(ContextualSearchJsApiServiceImpl); |
30 }; | 34 }; |
31 | 35 |
32 // static | 36 // static |
33 void CreateContextualSearchJsApiService( | 37 void CreateContextualSearchJsApiService( |
34 ContextualSearchJsApiHandler* contextual_search_js_api_handler, | 38 ContextualSearchJsApiHandler* contextual_search_js_api_handler, |
35 mojo::InterfaceRequest<mojom::ContextualSearchJsApiService> request); | 39 const service_manager::BindSourceInfo& source_info, |
| 40 mojom::ContextualSearchJsApiServiceRequest request); |
36 | 41 |
37 } // namespace contextual_search | 42 } // namespace contextual_search |
38 | 43 |
39 #endif // COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE
_IMPL_H_ | 44 #endif // COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE
_IMPL_H_ |
OLD | NEW |