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

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

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some InterfaceProvider impls for common cases Created 6 years, 5 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 #ifndef MOJO_SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_ 5 #ifndef MOJO_SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_
6 #define MOJO_SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_ 6 #define MOJO_SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_
7 7
8 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_delegate.h"
9 #include "mojo/public/cpp/application/interface_provider.h"
9 #include "mojo/public/cpp/system/macros.h" 10 #include "mojo/public/cpp/system/macros.h"
10 #include "mojo/services/test_service/test_request_tracker_impl.h" 11 #include "mojo/services/test_service/test_request_tracker_impl.h"
11 12
12 namespace mojo { 13 namespace mojo {
13 namespace test { 14 namespace test {
15 class TestTimeService;
14 16
15 // Embeds TestRequestTracker mojo services into an application. 17 // Embeds TestRequestTracker mojo services into an application.
16 class TestRequestTrackerApplication : public ApplicationDelegate { 18 class TestRequestTrackerApplication
19 : public ApplicationDelegate,
20 public InterfaceProvider<TestTimeService> {
17 public: 21 public:
18 TestRequestTrackerApplication(); 22 TestRequestTrackerApplication();
19 virtual ~TestRequestTrackerApplication(); 23 virtual ~TestRequestTrackerApplication();
20 24
25 // ApplicationDelegate methods:
21 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) 26 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
22 MOJO_OVERRIDE; 27 MOJO_OVERRIDE;
23 28
29 // InterfaceProvider<TestTimeService> methods:
30 virtual void BindToRequest(ApplicationConnection* connection,
31 InterfaceRequest<TestTimeService> request)
32 MOJO_OVERRIDE;
33
24 private: 34 private:
25 TrackingContext context_; 35 TrackingContext context_;
26 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRequestTrackerApplication); 36 MOJO_DISALLOW_COPY_AND_ASSIGN(TestRequestTrackerApplication);
27 }; 37 };
28 38
29 } // namespace test 39 } // namespace test
30 } // namespace mojo 40 } // namespace mojo
31 41
32 #endif // MOJO_SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_ 42 #endif // MOJO_SERVICES_TEST_SERVICE_TEST_REQUEST_TRACKER_APPLICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698