| Index: components/contextual_search/contextual_search_api_service_impl.cc
|
| diff --git a/components/contextual_search/contextual_search_api_service_impl.cc b/components/contextual_search/contextual_search_api_service_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..03e2e9fa76d667199f2792b6b387c311c6bad144
|
| --- /dev/null
|
| +++ b/components/contextual_search/contextual_search_api_service_impl.cc
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/contextual_search/contextual_search_api_service_impl.h"
|
| +
|
| +#include "components/contextual_search/contextual_search_ui_handle.h"
|
| +
|
| +namespace contextual_search {
|
| +
|
| +ContextualSearchApiServiceImpl::ContextualSearchApiServiceImpl(
|
| + ContextualSearchUIHandle* contextual_search_ui_handle,
|
| + mojo::InterfaceRequest<ContextualSearchApiService> request)
|
| + : binding_(this, request.Pass()),
|
| + contextual_search_ui_handle_(contextual_search_ui_handle) {}
|
| +
|
| +ContextualSearchApiServiceImpl::~ContextualSearchApiServiceImpl() {}
|
| +
|
| +void ContextualSearchApiServiceImpl::HandleSetCaption(
|
| + const mojo::String& caption) {
|
| + contextual_search_ui_handle_->SetCaption(caption);
|
| +}
|
| +
|
| +// static
|
| +void CreateContextualSearchApiService(
|
| + ContextualSearchUIHandle* contextual_search_ui_handle,
|
| + mojo::InterfaceRequest<ContextualSearchApiService> request) {
|
| + // This is strongly bound and owned by the pipe.
|
| + new ContextualSearchApiServiceImpl(contextual_search_ui_handle,
|
| + request.Pass());
|
| +}
|
| +
|
| +} // namespace contextual_search
|
|
|