Chromium Code Reviews| 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/mojo/service_registry_impl.h" | 10 #include "content/common/mojo/service_registry_impl.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 // Two-phase initialization: | 34 // Two-phase initialization: |
| 35 // 1- Init makes service_registry() available synchronously. | 35 // 1- Init makes service_registry() available synchronously. |
| 36 // 2- Activate establishes the actual connection to the peer process. | 36 // 2- Activate establishes the actual connection to the peer process. |
| 37 bool Init(); | 37 bool Init(); |
| 38 void Activate(IPC::Sender* sender, base::ProcessHandle process_handle); | 38 void Activate(IPC::Sender* sender, base::ProcessHandle process_handle); |
| 39 | 39 |
| 40 void WillDestroySoon(); | 40 void WillDestroySoon(); |
| 41 | 41 |
| 42 ServiceRegistry* service_registry() { return &service_registry_; } | 42 ServiceRegistry* service_registry() { return &service_registry_; } |
| 43 | 43 |
| 44 #if defined(OS_ANDROID) | |
| 45 ServiceRegistryAndroid* service_registry_android() { | |
| 46 return service_registry_android_.get(); | |
| 47 } | |
| 48 #endif | |
|
qsr
2014/12/12 15:31:57
Keep a space before private:
ppi
2014/12/12 16:02:16
Done.
| |
| 44 private: | 49 private: |
| 45 mojo::embedder::ChannelInit channel_init_; | 50 mojo::embedder::ChannelInit channel_init_; |
| 46 mojo::embedder::ScopedPlatformHandle client_handle_; | 51 mojo::embedder::ScopedPlatformHandle client_handle_; |
| 47 | 52 |
| 48 bool did_activate_; | 53 bool did_activate_; |
| 49 | 54 |
| 50 ServiceRegistryImpl service_registry_; | 55 ServiceRegistryImpl service_registry_; |
| 51 | 56 |
| 52 #if defined(OS_ANDROID) | 57 #if defined(OS_ANDROID) |
| 53 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; | 58 scoped_ptr<ServiceRegistryAndroid> service_registry_android_; |
| 54 #endif | 59 #endif |
| 55 | 60 |
| 56 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); | 61 DISALLOW_COPY_AND_ASSIGN(MojoApplicationHost); |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 } // namespace content | 64 } // namespace content |
| 60 | 65 |
| 61 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ | 66 #endif // CONTENT_BROWSER_MOJO_MOJO_APPLICATION_HOST_H_ |
| OLD | NEW |