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 #include "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "mojo/shell/application_loader.h" | 9 #include "mojo/shell/application_loader.h" |
10 #include "mojo/shell/application_manager.h" | 10 #include "mojo/shell/application_manager.h" |
11 #include "mojo/shell/capability_filter_unittest.mojom.h" | 11 #include "mojo/shell/capability_filter_unittest.mojom.h" |
12 #include "mojo/shell/public/cpp/application_impl.h" | |
13 #include "mojo/shell/public/cpp/shell_client.h" | 12 #include "mojo/shell/public/cpp/shell_client.h" |
| 13 #include "mojo/shell/public/cpp/shell_connection.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 namespace shell { | 17 namespace shell { |
18 namespace test { | 18 namespace test { |
19 | 19 |
20 class ConnectionValidator; | 20 class ConnectionValidator; |
21 | 21 |
22 // This class models an application who will use the shell to interact with a | 22 // This class models an application who will use the shell to interact with a |
23 // system service. The shell may limit this application's visibility of the full | 23 // system service. The shell may limit this application's visibility of the full |
(...skipping 20 matching lines...) Expand all Loading... |
44 }; | 44 }; |
45 | 45 |
46 class TestLoader : public ApplicationLoader { | 46 class TestLoader : public ApplicationLoader { |
47 public: | 47 public: |
48 explicit TestLoader(ShellClient* delegate); | 48 explicit TestLoader(ShellClient* delegate); |
49 ~TestLoader() override; | 49 ~TestLoader() override; |
50 | 50 |
51 private: | 51 private: |
52 // Overridden from ApplicationLoader: | 52 // Overridden from ApplicationLoader: |
53 void Load(const GURL& url, | 53 void Load(const GURL& url, |
54 InterfaceRequest<mojom::Application> request) override; | 54 InterfaceRequest<mojom::ShellClient> request) override; |
55 | 55 |
56 scoped_ptr<ShellClient> delegate_; | 56 scoped_ptr<ShellClient> delegate_; |
57 scoped_ptr<ApplicationImpl> app_; | 57 scoped_ptr<ShellConnection> app_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(TestLoader); | 59 DISALLOW_COPY_AND_ASSIGN(TestLoader); |
60 }; | 60 }; |
61 | 61 |
62 class CapabilityFilterTest : public testing::Test { | 62 class CapabilityFilterTest : public testing::Test { |
63 public: | 63 public: |
64 CapabilityFilterTest(); | 64 CapabilityFilterTest(); |
65 ~CapabilityFilterTest() override; | 65 ~CapabilityFilterTest() override; |
66 | 66 |
67 protected: | 67 protected: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 base::MessageLoop loop_; | 102 base::MessageLoop loop_; |
103 scoped_ptr<ApplicationManager> application_manager_; | 103 scoped_ptr<ApplicationManager> application_manager_; |
104 ConnectionValidator* validator_; | 104 ConnectionValidator* validator_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(CapabilityFilterTest); | 106 DISALLOW_COPY_AND_ASSIGN(CapabilityFilterTest); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace test | 109 } // namespace test |
110 } // namespace shell | 110 } // namespace shell |
111 } // namespace mojo | 111 } // namespace mojo |
OLD | NEW |