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

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

Issue 1385663002: [Contextual Search] Add Mojo-enabled API component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a few more missing dependencies to the new component's BUILD.gn rules for our renderer sectio… Created 5 years 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 #include "components/contextual_search/browser/contextual_search_js_api_service_ impl.h"
6
7 #include "components/contextual_search/browser/contextual_search_ui_handle.h"
8
9 namespace contextual_search {
10
11 ContextualSearchJsApiServiceImpl::ContextualSearchJsApiServiceImpl(
12 ContextualSearchUIHandle* contextual_search_ui_handle,
13 mojo::InterfaceRequest<ContextualSearchJsApiService> request)
14 : binding_(this, request.Pass()),
15 contextual_search_ui_handle_(contextual_search_ui_handle) {}
16
17 ContextualSearchJsApiServiceImpl::~ContextualSearchJsApiServiceImpl() {}
18
19 void ContextualSearchJsApiServiceImpl::HandleSetCaption(
20 const mojo::String& caption,
21 bool does_answer) {
22 contextual_search_ui_handle_->SetCaption(caption, does_answer);
23 }
24
25 // static
26 void CreateContextualSearchJsApiService(
27 ContextualSearchUIHandle* contextual_search_ui_handle,
28 mojo::InterfaceRequest<ContextualSearchJsApiService> request) {
29 // This is strongly bound and owned by the pipe.
30 new ContextualSearchJsApiServiceImpl(contextual_search_ui_handle,
31 request.Pass());
32 }
33
34 } // namespace contextual_search
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698