| 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 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "components/arc/instance_holder.h" | 12 #include "components/arc/instance_holder.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class CommandLine; | 15 class CommandLine; |
| 16 } // namespace base | 16 } // namespace base |
| 17 | 17 |
| 18 namespace arc { | 18 namespace arc { |
| 19 | 19 |
| 20 namespace mojom { | 20 namespace mojom { |
| 21 | 21 |
| 22 // Instead of including components/arc/common/arc_bridge.mojom.h, list all the | 22 // Instead of including components/arc/common/arc_bridge.mojom.h, list all the |
| 23 // instance classes here for faster build. | 23 // instance classes here for faster build. |
| 24 class AccessibilityHelperInstance; |
| 24 class AppInstance; | 25 class AppInstance; |
| 25 class AudioInstance; | 26 class AudioInstance; |
| 26 class AuthInstance; | 27 class AuthInstance; |
| 27 class BluetoothInstance; | 28 class BluetoothInstance; |
| 28 class BootPhaseMonitorInstance; | 29 class BootPhaseMonitorInstance; |
| 29 class ClipboardInstance; | 30 class ClipboardInstance; |
| 30 class CrashCollectorInstance; | 31 class CrashCollectorInstance; |
| 31 class EnterpriseReportingInstance; | 32 class EnterpriseReportingInstance; |
| 32 class FileSystemInstance; | 33 class FileSystemInstance; |
| 33 class ImeInstance; | 34 class ImeInstance; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 54 public: | 55 public: |
| 55 ArcBridgeService(); | 56 ArcBridgeService(); |
| 56 ~ArcBridgeService(); | 57 ~ArcBridgeService(); |
| 57 | 58 |
| 58 // Returns true if ARC has been enabled through a commandline switch. | 59 // Returns true if ARC has been enabled through a commandline switch. |
| 59 static bool GetEnabled(const base::CommandLine* command_line); | 60 static bool GetEnabled(const base::CommandLine* command_line); |
| 60 | 61 |
| 61 // Returns true if ARC is available on the current board. | 62 // Returns true if ARC is available on the current board. |
| 62 static bool GetAvailable(const base::CommandLine* command_line); | 63 static bool GetAvailable(const base::CommandLine* command_line); |
| 63 | 64 |
| 65 InstanceHolder<mojom::AccessibilityHelperInstance>* accessibility_helper() { |
| 66 return &accessibility_helper_; |
| 67 } |
| 64 InstanceHolder<mojom::AppInstance>* app() { return &app_; } | 68 InstanceHolder<mojom::AppInstance>* app() { return &app_; } |
| 65 InstanceHolder<mojom::AudioInstance>* audio() { return &audio_; } | 69 InstanceHolder<mojom::AudioInstance>* audio() { return &audio_; } |
| 66 InstanceHolder<mojom::AuthInstance>* auth() { return &auth_; } | 70 InstanceHolder<mojom::AuthInstance>* auth() { return &auth_; } |
| 67 InstanceHolder<mojom::BluetoothInstance>* bluetooth() { return &bluetooth_; } | 71 InstanceHolder<mojom::BluetoothInstance>* bluetooth() { return &bluetooth_; } |
| 68 InstanceHolder<mojom::BootPhaseMonitorInstance>* boot_phase_monitor() { | 72 InstanceHolder<mojom::BootPhaseMonitorInstance>* boot_phase_monitor() { |
| 69 return &boot_phase_monitor_; | 73 return &boot_phase_monitor_; |
| 70 } | 74 } |
| 71 InstanceHolder<mojom::ClipboardInstance>* clipboard() { return &clipboard_; } | 75 InstanceHolder<mojom::ClipboardInstance>* clipboard() { return &clipboard_; } |
| 72 InstanceHolder<mojom::CrashCollectorInstance>* crash_collector() { | 76 InstanceHolder<mojom::CrashCollectorInstance>* crash_collector() { |
| 73 return &crash_collector_; | 77 return &crash_collector_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 96 InstanceHolder<mojom::PrintInstance>* print() { return &print_; } | 100 InstanceHolder<mojom::PrintInstance>* print() { return &print_; } |
| 97 InstanceHolder<mojom::ProcessInstance>* process() { return &process_; } | 101 InstanceHolder<mojom::ProcessInstance>* process() { return &process_; } |
| 98 InstanceHolder<mojom::StorageManagerInstance>* storage_manager() { | 102 InstanceHolder<mojom::StorageManagerInstance>* storage_manager() { |
| 99 return &storage_manager_; | 103 return &storage_manager_; |
| 100 } | 104 } |
| 101 InstanceHolder<mojom::TtsInstance>* tts() { return &tts_; } | 105 InstanceHolder<mojom::TtsInstance>* tts() { return &tts_; } |
| 102 InstanceHolder<mojom::VideoInstance>* video() { return &video_; } | 106 InstanceHolder<mojom::VideoInstance>* video() { return &video_; } |
| 103 InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; } | 107 InstanceHolder<mojom::WallpaperInstance>* wallpaper() { return &wallpaper_; } |
| 104 | 108 |
| 105 private: | 109 private: |
| 110 InstanceHolder<mojom::AccessibilityHelperInstance> accessibility_helper_; |
| 106 InstanceHolder<mojom::AppInstance> app_; | 111 InstanceHolder<mojom::AppInstance> app_; |
| 107 InstanceHolder<mojom::AudioInstance> audio_; | 112 InstanceHolder<mojom::AudioInstance> audio_; |
| 108 InstanceHolder<mojom::AuthInstance> auth_; | 113 InstanceHolder<mojom::AuthInstance> auth_; |
| 109 InstanceHolder<mojom::BluetoothInstance> bluetooth_; | 114 InstanceHolder<mojom::BluetoothInstance> bluetooth_; |
| 110 InstanceHolder<mojom::BootPhaseMonitorInstance> boot_phase_monitor_; | 115 InstanceHolder<mojom::BootPhaseMonitorInstance> boot_phase_monitor_; |
| 111 InstanceHolder<mojom::ClipboardInstance> clipboard_; | 116 InstanceHolder<mojom::ClipboardInstance> clipboard_; |
| 112 InstanceHolder<mojom::CrashCollectorInstance> crash_collector_; | 117 InstanceHolder<mojom::CrashCollectorInstance> crash_collector_; |
| 113 InstanceHolder<mojom::EnterpriseReportingInstance> enterprise_reporting_; | 118 InstanceHolder<mojom::EnterpriseReportingInstance> enterprise_reporting_; |
| 114 InstanceHolder<mojom::FileSystemInstance> file_system_; | 119 InstanceHolder<mojom::FileSystemInstance> file_system_; |
| 115 InstanceHolder<mojom::ImeInstance> ime_; | 120 InstanceHolder<mojom::ImeInstance> ime_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 127 InstanceHolder<mojom::TtsInstance> tts_; | 132 InstanceHolder<mojom::TtsInstance> tts_; |
| 128 InstanceHolder<mojom::VideoInstance> video_; | 133 InstanceHolder<mojom::VideoInstance> video_; |
| 129 InstanceHolder<mojom::WallpaperInstance> wallpaper_; | 134 InstanceHolder<mojom::WallpaperInstance> wallpaper_; |
| 130 | 135 |
| 131 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); | 136 DISALLOW_COPY_AND_ASSIGN(ArcBridgeService); |
| 132 }; | 137 }; |
| 133 | 138 |
| 134 } // namespace arc | 139 } // namespace arc |
| 135 | 140 |
| 136 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ | 141 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_H_ |
| OLD | NEW |