Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |