| 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 #include "components/contextual_search/browser/contextual_search_api_service_imp
l.h" |
| 6 |
| 7 #include "components/contextual_search/browser/contextual_search_ui_handle.h" |
| 8 |
| 9 namespace contextual_search { |
| 10 |
| 11 ContextualSearchApiServiceImpl::ContextualSearchApiServiceImpl( |
| 12 ContextualSearchUIHandle* contextual_search_ui_handle, |
| 13 mojo::InterfaceRequest<ContextualSearchApiService> request) |
| 14 : binding_(this, request.Pass()), |
| 15 contextual_search_ui_handle_(contextual_search_ui_handle) {} |
| 16 |
| 17 ContextualSearchApiServiceImpl::~ContextualSearchApiServiceImpl() {} |
| 18 |
| 19 void ContextualSearchApiServiceImpl::HandleSetCaption( |
| 20 const mojo::String& caption) { |
| 21 contextual_search_ui_handle_->SetCaption(caption); |
| 22 } |
| 23 |
| 24 // static |
| 25 void CreateContextualSearchApiService( |
| 26 ContextualSearchUIHandle* contextual_search_ui_handle, |
| 27 mojo::InterfaceRequest<ContextualSearchApiService> request) { |
| 28 // This is strongly bound and owned by the pipe. |
| 29 new ContextualSearchApiServiceImpl(contextual_search_ui_handle, |
| 30 request.Pass()); |
| 31 } |
| 32 |
| 33 } // namespace contextual_search |
| OLD | NEW |