OLD | NEW |
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_test_base.h" | 5 #include "mojo/public/cpp/application/application_test_base.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
10 #include "mojo/public/cpp/environment/environment.h" | 10 #include "mojo/public/cpp/environment/environment.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void Initialize(InterfaceHandle<Shell> shell, | 55 void Initialize(InterfaceHandle<Shell> shell, |
56 Array<String> args, | 56 Array<String> args, |
57 const mojo::String& url) override { | 57 const mojo::String& url) override { |
58 *args_ = args.Pass(); | 58 *args_ = args.Pass(); |
59 g_url = url; | 59 g_url = url; |
60 g_application_request = binding_.Unbind(); | 60 g_application_request = binding_.Unbind(); |
61 g_shell = ShellPtr::Create(std::move(shell)); | 61 g_shell = ShellPtr::Create(std::move(shell)); |
62 } | 62 } |
63 | 63 |
64 void AcceptConnection(const String& requestor_url, | 64 void AcceptConnection(const String& requestor_url, |
65 InterfaceRequest<ServiceProvider> services, | 65 const String& url, |
66 InterfaceHandle<ServiceProvider> exposed_services, | 66 InterfaceRequest<ServiceProvider> services) override { |
67 const String& url) override { | |
68 MOJO_CHECK(false); | 67 MOJO_CHECK(false); |
69 } | 68 } |
70 | 69 |
71 void RequestQuit() override { MOJO_CHECK(false); } | 70 void RequestQuit() override { MOJO_CHECK(false); } |
72 | 71 |
73 Array<String>* args_; | 72 Array<String>* args_; |
74 Binding<Application> binding_; | 73 Binding<Application> binding_; |
75 }; | 74 }; |
76 | 75 |
77 } // namespace | 76 } // namespace |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 if (ShouldCreateDefaultRunLoop()) | 152 if (ShouldCreateDefaultRunLoop()) |
154 Environment::DestroyDefaultRunLoop(); | 153 Environment::DestroyDefaultRunLoop(); |
155 } | 154 } |
156 | 155 |
157 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { | 156 bool ApplicationTestBase::ShouldCreateDefaultRunLoop() { |
158 return true; | 157 return true; |
159 } | 158 } |
160 | 159 |
161 } // namespace test | 160 } // namespace test |
162 } // namespace mojo | 161 } // namespace mojo |
OLD | NEW |