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

Side by Side Diff: mojo/examples/hello_world_service/hello_world_service_impl.cc

Issue 109103003: Mojo: abstract interface implementation from generated Stub classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/examples/hello_world_service/hello_world_service_impl.h" 5 #include "mojo/examples/hello_world_service/hello_world_service_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace mojo { 11 namespace mojo {
12 namespace examples { 12 namespace examples {
13 13
14 HelloWorldServiceImpl::HelloWorldServiceImpl(ScopedMessagePipeHandle pipe) 14 HelloWorldServiceImpl::HelloWorldServiceImpl(ScopedMessagePipeHandle pipe)
15 : client_(pipe.Pass()) { 15 : client_(pipe.Pass(), this) {
16 client_.SetPeer(this);
17 } 16 }
18 17
19 void HelloWorldServiceImpl::Greeting(const String& greeting) { 18 void HelloWorldServiceImpl::Greeting(const String& greeting) {
20 LOG(INFO) << greeting.To<std::string>(); 19 LOG(INFO) << greeting.To<std::string>();
21 client_->DidReceiveGreeting(42); 20 client_->DidReceiveGreeting(42);
22 } 21 }
23 22
24 HelloWorldServiceImpl::~HelloWorldServiceImpl() {} 23 HelloWorldServiceImpl::~HelloWorldServiceImpl() {}
25 24
26 } // namespace examples 25 } // namespace examples
27 } // namespace mojo 26 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698