| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 mojo::ScopedMessagePipeHandle pipe) { | 134 mojo::ScopedMessagePipeHandle pipe) { |
| 135 task_runner->PostTask( | 135 task_runner->PostTask( |
| 136 FROM_HERE, | 136 FROM_HERE, |
| 137 base::Bind(&TargetApplicationDelegate::OnMessagePipeCreatedOnMainThread, | 137 base::Bind(&TargetApplicationDelegate::OnMessagePipeCreatedOnMainThread, |
| 138 weak_self, base::Passed(&request), base::Passed(&pipe))); | 138 weak_self, base::Passed(&request), base::Passed(&pipe))); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void OnMessagePipeCreatedOnMainThread( | 141 void OnMessagePipeCreatedOnMainThread( |
| 142 mojo::InterfaceRequest<mojo::shell::mojom::PIDReceiver> request, | 142 mojo::InterfaceRequest<mojo::shell::mojom::PIDReceiver> request, |
| 143 mojo::ScopedMessagePipeHandle pipe) { | 143 mojo::ScopedMessagePipeHandle pipe) { |
| 144 mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New()); | 144 mojo::shell::mojom::CapabilityFilterPtr filter( |
| 145 mojo::shell::mojom::CapabilityFilter::New()); |
| 145 mojo::Array<mojo::String> test_interfaces; | 146 mojo::Array<mojo::String> test_interfaces; |
| 146 test_interfaces.push_back( | 147 test_interfaces.push_back( |
| 147 mojo::shell::test::mojom::CreateInstanceForHandleTest::Name_); | 148 mojo::shell::test::mojom::CreateInstanceForHandleTest::Name_); |
| 148 filter->filter.insert("mojo:mojo_shell_apptests", | 149 filter->filter.insert("mojo:mojo_shell_apptests", |
| 149 std::move(test_interfaces)); | 150 std::move(test_interfaces)); |
| 150 | 151 |
| 151 mojo::shell::mojom::ApplicationManagerPtr application_manager; | 152 mojo::shell::mojom::ApplicationManagerPtr application_manager; |
| 152 app_->ConnectToService("mojo:shell", &application_manager); | 153 app_->ConnectToService("mojo:shell", &application_manager); |
| 153 application_manager->CreateInstanceForHandle( | 154 application_manager->CreateInstanceForHandle( |
| 154 mojo::ScopedHandle(mojo::Handle(pipe.release().value())), | 155 mojo::ScopedHandle(mojo::Handle(pipe.release().value())), |
| (...skipping 13 matching lines...) Expand all Loading... |
| 168 | 169 |
| 169 int main(int argc, char** argv) { | 170 int main(int argc, char** argv) { |
| 170 base::AtExitManager at_exit; | 171 base::AtExitManager at_exit; |
| 171 base::CommandLine::Init(argc, argv); | 172 base::CommandLine::Init(argc, argv); |
| 172 | 173 |
| 173 mojo::shell::InitializeLogging(); | 174 mojo::shell::InitializeLogging(); |
| 174 | 175 |
| 175 TargetApplicationDelegate delegate; | 176 TargetApplicationDelegate delegate; |
| 176 return mojo::shell::TestNativeMain(&delegate); | 177 return mojo::shell::TestNativeMain(&delegate); |
| 177 } | 178 } |
| OLD | NEW |