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

Side by Side Diff: components/contextual_search/browser/contextual_search_js_api_service_impl.cc

Issue 1532743002: [Contextual Search] Use Mojo API for Quick Answers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated a comment. Created 4 years, 11 months 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/contextual_search/browser/contextual_search_js_api_service_ impl.h" 5 #include "components/contextual_search/browser/contextual_search_js_api_service_ impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "components/contextual_search/browser/contextual_search_ui_handle.h" 9 #include "components/contextual_search/browser/contextual_search_js_api_handler. h"
10 10
11 namespace contextual_search { 11 namespace contextual_search {
12 12
13 ContextualSearchJsApiServiceImpl::ContextualSearchJsApiServiceImpl( 13 ContextualSearchJsApiServiceImpl::ContextualSearchJsApiServiceImpl(
14 ContextualSearchUIHandle* contextual_search_ui_handle, 14 ContextualSearchJsApiHandler* contextual_search_js_api_handler,
15 mojo::InterfaceRequest<ContextualSearchJsApiService> request) 15 mojo::InterfaceRequest<ContextualSearchJsApiService> request)
16 : binding_(this, std::move(request)), 16 : binding_(this, std::move(request)),
17 contextual_search_ui_handle_(contextual_search_ui_handle) {} 17 contextual_search_js_api_handler_(contextual_search_js_api_handler) {}
18 18
19 ContextualSearchJsApiServiceImpl::~ContextualSearchJsApiServiceImpl() {} 19 ContextualSearchJsApiServiceImpl::~ContextualSearchJsApiServiceImpl() {}
20 20
21 void ContextualSearchJsApiServiceImpl::HandleSetCaption( 21 void ContextualSearchJsApiServiceImpl::HandleSetCaption(
22 const mojo::String& caption, 22 const mojo::String& caption,
23 bool does_answer) { 23 bool does_answer) {
24 contextual_search_ui_handle_->SetCaption(caption, does_answer); 24 contextual_search_js_api_handler_->SetCaption(caption, does_answer);
25 } 25 }
26 26
27 // static 27 // static
28 void CreateContextualSearchJsApiService( 28 void CreateContextualSearchJsApiService(
29 ContextualSearchUIHandle* contextual_search_ui_handle, 29 ContextualSearchJsApiHandler* contextual_search_js_api_handler,
30 mojo::InterfaceRequest<ContextualSearchJsApiService> request) { 30 mojo::InterfaceRequest<ContextualSearchJsApiService> request) {
31 // This is strongly bound and owned by the pipe. 31 // This is strongly bound and owned by the pipe.
32 new ContextualSearchJsApiServiceImpl(contextual_search_ui_handle, 32 new ContextualSearchJsApiServiceImpl(contextual_search_js_api_handler,
33 std::move(request)); 33 std::move(request));
34 } 34 }
35 35
36 } // namespace contextual_search 36 } // namespace contextual_search
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698