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 "content/browser/mojo/mojo_application_host.h" | 5 #include "content/browser/mojo/mojo_application_host.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/common/mojo/mojo_messages.h" | 10 #include "content/common/mojo/mojo_messages.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 | 36 |
37 mojo::Binding<mojom::ApplicationSetup> binding_; | 37 mojo::Binding<mojom::ApplicationSetup> binding_; |
38 ServiceRegistryImpl* service_registry_; | 38 ServiceRegistryImpl* service_registry_; |
39 }; | 39 }; |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 MojoApplicationHost::MojoApplicationHost() : did_activate_(false) { | 43 MojoApplicationHost::MojoApplicationHost() : did_activate_(false) { |
44 #if defined(OS_ANDROID) | 44 #if defined(OS_ANDROID) |
45 service_registry_android_.reset( | 45 service_registry_android_ = |
46 new ServiceRegistryAndroid(&service_registry_)); | 46 ServiceRegistryAndroid::Create(&service_registry_); |
47 #endif | 47 #endif |
48 } | 48 } |
49 | 49 |
50 MojoApplicationHost::~MojoApplicationHost() { | 50 MojoApplicationHost::~MojoApplicationHost() { |
51 } | 51 } |
52 | 52 |
53 bool MojoApplicationHost::Init() { | 53 bool MojoApplicationHost::Init() { |
54 DCHECK(!client_handle_.is_valid()) << "Already initialized!"; | 54 DCHECK(!client_handle_.is_valid()) << "Already initialized!"; |
55 | 55 |
56 mojo::edk::PlatformChannelPair channel_pair; | 56 mojo::edk::PlatformChannelPair channel_pair; |
(...skipping 27 matching lines...) Expand all Loading... |
84 IPC::GetFileHandleForProcess(client_file, process_handle, true))); | 84 IPC::GetFileHandleForProcess(client_file, process_handle, true))); |
85 } | 85 } |
86 | 86 |
87 void MojoApplicationHost::OverrideIOTaskRunnerForTest( | 87 void MojoApplicationHost::OverrideIOTaskRunnerForTest( |
88 scoped_refptr<base::TaskRunner> io_task_runner) { | 88 scoped_refptr<base::TaskRunner> io_task_runner) { |
89 io_task_runner_override_ = io_task_runner; | 89 io_task_runner_override_ = io_task_runner; |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 } // namespace content | 93 } // namespace content |
OLD | NEW |