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

Side by Side Diff: components/contextual_search/browser/contextual_search_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: Separate component code into browser/common/renderer, and address Jochen's comments. Created 5 years, 1 month 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_API_SERVICE_IMPL_ H_
6 #define COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_API_SERVICE_IMPL_ 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_api_service.mojo m.h"
11 #include "content/public/browser/render_frame_host.h"
mdjones 2015/11/19 20:31:24 Is this include needed?
Donn Denman 2015/11/20 00:01:41 Done.
12 #include "mojo/public/cpp/bindings/string.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h"
14
15 namespace contextual_search {
16
17 // This is the receiving end of Contextual Search JavaScript API calls.
18 class ContextualSearchApiServiceImpl : public ContextualSearchApiService {
19 public:
20 ContextualSearchApiServiceImpl(
21 ContextualSearchUIHandle* contextual_search_ui_handle,
22 mojo::InterfaceRequest<ContextualSearchApiService> request);
23 ~ContextualSearchApiServiceImpl() override;
24
25 // Mojo ContextualSearchApiService implementation.
26 void HandleSetCaption(const mojo::String& message) override;
27
28 private:
29 mojo::StrongBinding<ContextualSearchApiService> binding_;
30
31 // The UI that handles calls through this API.
32 ContextualSearchUIHandle* contextual_search_ui_handle_;
33
34 DISALLOW_COPY_AND_ASSIGN(ContextualSearchApiServiceImpl);
35 };
36
37 // static
38 void CreateContextualSearchApiService(
39 ContextualSearchUIHandle* contextual_search_ui_handle,
40 mojo::InterfaceRequest<ContextualSearchApiService> request);
41
42 } // namespace contextual_search
43
44 #endif // COMPONENTS_CONTEXTUAL_SEARCH_BROWSER_CONTEXTUAL_SEARCH_API_SERVICE_IM PL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698