| 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 #ifndef CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ | 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ |
| 6 #define CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ | 6 #define CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "content/common/application_setup.mojom.h" | 10 #include "content/common/application_setup.mojom.h" |
| 11 #include "content/common/mojo/channel_init.h" | 11 #include "content/common/mojo/channel_init.h" |
| 12 #include "content/common/mojo/service_registry_impl.h" | 12 #include "content/common/mojo/service_registry_impl.h" |
| 13 |
| 14 #if defined(USE_CHROME_EDK) |
| 15 #include "mojo/edk/embedder/scoped_platform_handle.h" |
| 16 #else |
| 13 #include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h" | 17 #include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h" |
| 18 #endif |
| 14 | 19 |
| 15 #if defined(OS_ANDROID) | 20 #if defined(OS_ANDROID) |
| 16 #include "content/browser/mojo/service_registry_android.h" | 21 #include "content/browser/mojo/service_registry_android.h" |
| 17 #endif | 22 #endif |
| 18 | 23 |
| 19 namespace IPC { | 24 namespace IPC { |
| 20 class Sender; | 25 class Sender; |
| 21 } | 26 } |
| 22 | 27 |
| 23 namespace content { | 28 namespace content { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 49 ServiceRegistryAndroid* service_registry_android() { | 54 ServiceRegistryAndroid* service_registry_android() { |
| 50 return service_registry_android_.get(); | 55 return service_registry_android_.get(); |
| 51 } | 56 } |
| 52 #endif | 57 #endif |
| 53 | 58 |
| 54 void OverrideIOTaskRunnerForTest( | 59 void OverrideIOTaskRunnerForTest( |
| 55 scoped_refptr<base::TaskRunner> io_task_runner); | 60 scoped_refptr<base::TaskRunner> io_task_runner); |
| 56 | 61 |
| 57 private: | 62 private: |
| 58 ChannelInit channel_init_; | 63 ChannelInit channel_init_; |
| 64 #if defined(USE_CHROME_EDK) |
| 65 mojo::edk::ScopedPlatformHandle client_handle_; |
| 66 #else |
| 59 mojo::embedder::ScopedPlatformHandle client_handle_; | 67 mojo::embedder::ScopedPlatformHandle client_handle_; |
| 68 #endif |
| 60 | 69 |
| 61 bool did_activate_; | 70 bool did_activate_; |
| 62 | 71 |
| 63 scoped_ptr<ApplicationSetup> application_setup_; | 72 scoped_ptr<ApplicationSetup> application_setup_; |
| 64 ServiceRegistryImpl service_registry_; | 73 ServiceRegistryImpl service_registry_; |
| 65 | 74 |
| 66 scoped_refptr<base::TaskRunner> io_task_runner_override_; | 75 scoped_refptr<base::TaskRunner> io_task_runner_override_; |
| 67 | 76 |
| 68 #if defined(OS_ANDROID) | 77 #if defined(OS_ANDROID) |
| 69 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; | 78 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; |
| 70 #endif | 79 #endif |
| 71 | 80 |
| 72 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); | 81 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); |
| 73 }; | 82 }; |
| 74 | 83 |
| 75 } // namespace content | 84 } // namespace content |
| 76 | 85 |
| 77 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ | 86 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ |
| OLD | NEW |