OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_ |
6 #define CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/public/test/test_mojo_service.mojom.h" | 9 #include "content/public/test/test_mojo_service.mojom.h" |
10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class TestMojoApp : public mojo::ShellClient, | 21 class TestMojoApp : public mojo::ShellClient, |
22 public mojo::InterfaceFactory<TestMojoService>, | 22 public mojo::InterfaceFactory<TestMojoService>, |
23 public TestMojoService { | 23 public TestMojoService { |
24 public: | 24 public: |
25 TestMojoApp(); | 25 TestMojoApp(); |
26 ~TestMojoApp() override; | 26 ~TestMojoApp() override; |
27 | 27 |
28 private: | 28 private: |
29 // mojo::ShellClient: | 29 // mojo::ShellClient: |
30 void Initialize(mojo::Shell* shell, const std::string& url, | 30 void Initialize(mojo::Shell* shell, const std::string& url, |
31 uint32_t id) override; | 31 uint32_t id, uint32_t user_id) override; |
32 bool AcceptConnection(mojo::Connection* connection) override; | 32 bool AcceptConnection(mojo::Connection* connection) override; |
33 | 33 |
34 // mojo::InterfaceFactory<TestMojoService>: | 34 // mojo::InterfaceFactory<TestMojoService>: |
35 void Create(mojo::Connection* connection, | 35 void Create(mojo::Connection* connection, |
36 mojo::InterfaceRequest<TestMojoService> request) override; | 36 mojo::InterfaceRequest<TestMojoService> request) override; |
37 | 37 |
38 // TestMojoService: | 38 // TestMojoService: |
39 void DoSomething(const DoSomethingCallback& callback) override; | 39 void DoSomething(const DoSomethingCallback& callback) override; |
40 void GetRequestorURL(const GetRequestorURLCallback& callback) override; | 40 void GetRequestorURL(const GetRequestorURLCallback& callback) override; |
41 | 41 |
42 mojo::Binding<TestMojoService> service_binding_; | 42 mojo::Binding<TestMojoService> service_binding_; |
43 | 43 |
44 // Not owned. | 44 // Not owned. |
45 mojo::Shell* shell_; | 45 mojo::Shell* shell_; |
46 | 46 |
47 // The URL of the app connecting to us. | 47 // The URL of the app connecting to us. |
48 GURL requestor_url_; | 48 GURL requestor_url_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(TestMojoApp); | 50 DISALLOW_COPY_AND_ASSIGN(TestMojoApp); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace | 53 } // namespace |
54 | 54 |
55 #endif // CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_ | 55 #endif // CONTENT_PUBLIC_TEST_TEST_MOJO_APP_H_ |
OLD | NEW |