| 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_IMPL_H_ | 5 #ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ |
| 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ | 6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/arc/arc_bridge_service.h" | 10 #include "components/arc/arc_bridge_service.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 void DetectAvailability() override; | 31 void DetectAvailability() override; |
| 32 | 32 |
| 33 void HandleStartup() override; | 33 void HandleStartup() override; |
| 34 | 34 |
| 35 void Shutdown() override; | 35 void Shutdown() override; |
| 36 | 36 |
| 37 bool RegisterInputDevice(const std::string& name, | 37 bool RegisterInputDevice(const std::string& name, |
| 38 const std::string& device_type, | 38 const std::string& device_type, |
| 39 base::ScopedFD fd) override; | 39 base::ScopedFD fd) override; |
| 40 | 40 |
| 41 bool SendNotificationEventToAndroid(const std::string& key, |
| 42 ArcNotificationEvent event) override; |
| 43 |
| 41 // Requests to refresh an app list. | 44 // Requests to refresh an app list. |
| 42 bool RefreshAppList() override; | 45 bool RefreshAppList() override; |
| 43 | 46 |
| 44 // Requests to launch an app. | 47 // Requests to launch an app. |
| 45 bool LaunchApp(const std::string& package, | 48 bool LaunchApp(const std::string& package, |
| 46 const std::string& activity) override; | 49 const std::string& activity) override; |
| 47 | 50 |
| 48 // Requests to load an icon of specific scale_factor. | 51 // Requests to load an icon of specific scale_factor. |
| 49 bool RequestAppIcon(const std::string& package, | 52 bool RequestAppIcon(const std::string& package, |
| 50 const std::string& activity, | 53 const std::string& activity, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 74 | 77 |
| 75 // Finishes connecting after setting socket permissions. | 78 // Finishes connecting after setting socket permissions. |
| 76 void SocketConnectAfterSetSocketPermissions(const base::FilePath& socket_path, | 79 void SocketConnectAfterSetSocketPermissions(const base::FilePath& socket_path, |
| 77 bool socket_permissions_success); | 80 bool socket_permissions_success); |
| 78 | 81 |
| 79 // Stops the running instance. | 82 // Stops the running instance. |
| 80 void StopInstance(); | 83 void StopInstance(); |
| 81 | 84 |
| 82 // Called when the instance has reached a boot phase | 85 // Called when the instance has reached a boot phase |
| 83 void OnInstanceBootPhase(InstanceBootPhase phase); | 86 void OnInstanceBootPhase(InstanceBootPhase phase); |
| 87 // Handler for ArcInstanceHostMsg_NotificationPosted message. |
| 88 void OnNotificationPostedFromAndroid(const ArcNotificationData& data); |
| 89 // Handler for ArcInstanceHostMsg_NotificationRemoved message. |
| 90 void OnNotificationRemovedFromAndroid(const std::string& key); |
| 84 | 91 |
| 85 // Called whenever ARC sends information about available apps. | 92 // Called whenever ARC sends information about available apps. |
| 86 void OnAppListRefreshed(const std::vector<arc::AppInfo>& apps); | 93 void OnAppListRefreshed(const std::vector<arc::AppInfo>& apps); |
| 87 | 94 |
| 88 // Called whenever ARC sends app icon data for specific scale factor. | 95 // Called whenever ARC sends app icon data for specific scale factor. |
| 89 void OnAppIcon(const std::string& package, | 96 void OnAppIcon(const std::string& package, |
| 90 const std::string& activity, | 97 const std::string& activity, |
| 91 ScaleFactor scale_factor, | 98 ScaleFactor scale_factor, |
| 92 const std::vector<uint8_t>& icon_png_data); | 99 const std::vector<uint8_t>& icon_png_data); |
| 93 | 100 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 109 | 116 |
| 110 // WeakPtrFactory to use callbacks. | 117 // WeakPtrFactory to use callbacks. |
| 111 base::WeakPtrFactory<ArcBridgeServiceImpl> weak_factory_; | 118 base::WeakPtrFactory<ArcBridgeServiceImpl> weak_factory_; |
| 112 | 119 |
| 113 DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceImpl); | 120 DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceImpl); |
| 114 }; | 121 }; |
| 115 | 122 |
| 116 } // namespace arc | 123 } // namespace arc |
| 117 | 124 |
| 118 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ | 125 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_IMPL_H_ |
| OLD | NEW |