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

Side by Side Diff: components/contextual_search/browser/contextual_search_js_api_service_impl.h

Issue 1385663002: [Contextual Search] Add Mojo-enabled API component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a few more missing dependencies to the new component's BUILD.gn rules for our renderer sectio… Created 5 years 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 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
8 #include "base/macros.h"
9 #include "components/contextual_search/browser/contextual_search_ui_handle.h"
10 #include "components/contextual_search/common/contextual_search_js_api_service.m ojom.h"
11 #include "mojo/public/cpp/bindings/string.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h"
13
14 namespace contextual_search {
15
16 // This is the receiving end of Contextual Search JavaScript API calls.
17 class ContextualSearchJsApiServiceImpl : public ContextualSearchJsApiService {
18 public:
19 ContextualSearchJsApiServiceImpl(
20 ContextualSearchUIHandle* contextual_search_ui_handle,
21 mojo::InterfaceRequest<ContextualSearchJsApiService> request);
22 ~ContextualSearchJsApiServiceImpl() override;
23
24 // Mojo ContextualSearchApiService implementation.
25 void HandleSetCaption(const mojo::String& message, bool does_answer) override;
26
27 private:
28 mojo::StrongBinding<ContextualSearchJsApiService> binding_;
29
30 // The UI that handles calls through this API.
31 ContextualSearchUIHandle* contextual_search_ui_handle_;
32
33 DISALLOW_COPY_AND_ASSIGN(ContextualSearchJsApiServiceImpl);
34 };
35
36 // static
37 void CreateContextualSearchJsApiService(
38 ContextualSearchUIHandle* contextual_search_ui_handle,
39 mojo::InterfaceRequest<ContextualSearchJsApiService> request);
40
41 } // namespace contextual_search
42
43 #endif // COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_JS_API_SERVICE _IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698