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

Side by Side Diff: content/public/test/test_mojo_app.h

Issue 1149833007: Embed a mojo ApplicationManager in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 #ifndef CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_
6 #define CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_
7
8 #include "base/macros.h"
9 #include "content/public/test/test_mojo_service.mojom.h"
10 #include "mojo/application/public/cpp/application_delegate.h"
11 #include "mojo/application/public/cpp/interface_factory.h"
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
13
14 namespace content {
15
16 extern const char kTestMojoAppUrl[];
17
18 // Simple Mojo app which provides a TestMojoService impl. The app terminates
19 // itself after its TestService fulfills a single DoSomething call.
20 class TestMojoApp : public mojo::ApplicationDelegate,
21 public mojo::InterfaceFactory<TestMojoService>,
22 public TestMojoService {
23 public:
24 TestMojoApp();
25 ~TestMojoApp() override;
26
27 private:
28 // mojo::ApplicationDelegate:
29 void Initialize(mojo::ApplicationImpl* app) override;
30 bool ConfigureIncomingConnection(
31 mojo::ApplicationConnection* connection) override;
32
33 // mojo::InterfaceFactory<TestMojoService>:
34 void Create(mojo::ApplicationConnection* connection,
35 mojo::InterfaceRequest<TestMojoService> request) override;
36
37 // TestMojoService:
38 void DoSomething(const DoSomethingCallback& callback) override;
39
40 mojo::Binding<TestMojoService> service_binding_;
41
42 // Not owned.
43 mojo::ApplicationImpl* app_;
44
45 DISALLOW_COPY_AND_ASSIGN(TestMojoApp);
46 };
47
48 } // namespace
49
50 #endif // CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698