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

Side by Side Diff: mojo/services/test_service/test_service_impl.h

Issue 336483003: Mojo: Make the TestService quit when there are no more connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops, forgot some stuff Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/public/cpp/application/application.h" 5 #ifndef MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
6 #define MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
7
6 #include "mojo/public/cpp/system/macros.h" 8 #include "mojo/public/cpp/system/macros.h"
7 #include "mojo/services/test_service/test_service.mojom.h" 9 #include "mojo/services/test_service/test_service.mojom.h"
8 10
9 namespace mojo { 11 namespace mojo {
10 namespace test { 12 namespace test {
11 13
14 class TestServiceApplication;
15
12 class TestServiceImpl : public InterfaceImpl<ITestService> { 16 class TestServiceImpl : public InterfaceImpl<ITestService> {
13 public: 17 public:
14 TestServiceImpl(); 18 explicit TestServiceImpl(TestServiceApplication* application);
15 virtual ~TestServiceImpl(); 19 virtual ~TestServiceImpl();
16 20
17 // |ITestService| methods: 21 // |ITestService| methods:
22 virtual void OnConnectionEstablished() MOJO_OVERRIDE;
23 virtual void OnConnectionError() MOJO_OVERRIDE;
18 virtual void Ping(const mojo::Callback<void()>& callback) MOJO_OVERRIDE; 24 virtual void Ping(const mojo::Callback<void()>& callback) MOJO_OVERRIDE;
19 25
20 private: 26 private:
27 TestServiceApplication* const application_;
28
21 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl); 29 MOJO_DISALLOW_COPY_AND_ASSIGN(TestServiceImpl);
22 }; 30 };
23 31
24 } // namespace test 32 } // namespace test
25 } // namespace mojo 33 } // namespace mojo
26 34
35 #endif // MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/test_service/test_service_application.cc ('k') | mojo/services/test_service/test_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698