| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // to place it. | 35 // to place it. |
| 36 bool LaunchApp(content::BrowserContext* context, | 36 bool LaunchApp(content::BrowserContext* context, |
| 37 const std::string& app_id, | 37 const std::string& app_id, |
| 38 bool landscape_layout); | 38 bool landscape_layout); |
| 39 | 39 |
| 40 // Launch an app and place it at the specified coordinates. | 40 // Launch an app and place it at the specified coordinates. |
| 41 bool LaunchAppWithRect(content::BrowserContext* context, | 41 bool LaunchAppWithRect(content::BrowserContext* context, |
| 42 const std::string& app_id, | 42 const std::string& app_id, |
| 43 const gfx::Rect& target_rect); | 43 const gfx::Rect& target_rect); |
| 44 | 44 |
| 45 // Sets task active. |
| 46 void SetTaskActive(int task_id); |
| 47 |
| 48 // Closes the task. |
| 49 void CloseTask(int task_id); |
| 50 |
| 45 // Tests if the application can use the given target resolution. | 51 // Tests if the application can use the given target resolution. |
| 46 // The callback will receive the information once known. | 52 // The callback will receive the information once known. |
| 47 // A false will get returned if the result cannot be determined in which case | 53 // A false will get returned if the result cannot be determined in which case |
| 48 // the callback will not be called. | 54 // the callback will not be called. |
| 49 bool CanHandleResolution(content::BrowserContext* context, | 55 bool CanHandleResolution(content::BrowserContext* context, |
| 50 const std::string& app_id, | 56 const std::string& app_id, |
| 51 const gfx::Rect& rect, | 57 const gfx::Rect& rect, |
| 52 const CanHandleResolutionCallback& callback); | 58 const CanHandleResolutionCallback& callback); |
| 53 | 59 |
| 54 // Uninstalls the package in ARC. | 60 // Uninstalls the package in ARC. |
| 55 void UninstallPackage(const std::string& package_name); | 61 void UninstallPackage(const std::string& package_name); |
| 56 | 62 |
| 57 // Removes cached app shortcut icon in ARC. | 63 // Removes cached app shortcut icon in ARC. |
| 58 void RemoveCachedIcon(const std::string& icon_resource_id); | 64 void RemoveCachedIcon(const std::string& icon_resource_id); |
| 59 | 65 |
| 60 // Show package info for ARC package. | 66 // Show package info for ARC package. |
| 61 // Deprecated. Use ShowPackageInfoOnPage. | 67 // Deprecated. Use ShowPackageInfoOnPage. |
| 62 bool ShowPackageInfo(const std::string& package_name); | 68 bool ShowPackageInfo(const std::string& package_name); |
| 63 | 69 |
| 64 // Show package info for ARC package at the specified page. | 70 // Show package info for ARC package at the specified page. |
| 65 bool ShowPackageInfoOnPage(const std::string& package_name, | 71 bool ShowPackageInfoOnPage(const std::string& package_name, |
| 66 mojom::ShowPackageInfoPage page); | 72 mojom::ShowPackageInfoPage page); |
| 67 | 73 |
| 68 } // namespace arc | 74 } // namespace arc |
| 69 | 75 |
| 70 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ | 76 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ |
| OLD | NEW |