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

Side by Side Diff: components/contextual_search/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: Reworked to use a new Contextual Search component and Mojo communication, removed CS Manager stuff. 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_CONTEXTUAL_SEARCH_API_SERVICE_IMPL_H_
6 #define COMPONENTS_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_API_SERVICE_IMPL_H_
7
8 #include "components/contextual_search/contextual_search_api_service.mojom.h"
9 #include "components/contextual_search/contextual_search_ui_handle.h"
10 #include "content/public/browser/render_frame_host.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 ContextualSearchApiServiceImpl : public ContextualSearchApiService {
18 public:
19 ContextualSearchApiServiceImpl(
20 ContextualSearchUIHandle* contextual_search_ui_handle,
21 mojo::InterfaceRequest<ContextualSearchApiService> request);
22 ~ContextualSearchApiServiceImpl() override;
23
24 // Mojo ContextualSearchApiService implementation.
25
26 // Handle a call from the JS API to set the caption.
jochen (gone - plz use gerrit) 2015/11/17 14:58:12 that comment belongs on the base class
Donn Denman 2015/11/19 01:11:29 Done.
27 void HandleSetCaption(const mojo::String& message) override;
28
29 private:
30 mojo::StrongBinding<ContextualSearchApiService> binding_;
31
32 // The UI that handles calls through this API.
33 ContextualSearchUIHandle* contextual_search_ui_handle_;
34 };
jochen (gone - plz use gerrit) 2015/11/17 14:58:11 disallow copy/assign for all classes
Donn Denman 2015/11/19 01:11:29 Done for this class and all others in this CL.
35
36 // static
37 void CreateContextualSearchApiService(
38 ContextualSearchUIHandle* contextual_search_ui_handle,
39 mojo::InterfaceRequest<ContextualSearchApiService> request);
40
41 } // namespace contextual_search
42
43 #endif // COMPONENTS_CONTEXTUAL_SEARCH_CONTEXTUAL_SEARCH_API_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698