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