| 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" |
| 11 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 class BrowserContext; | 14 class BrowserContext; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace arc { | 17 namespace mojo { |
| 18 using CanHandleResolutionCallback = base::Callback<void(bool)>; | 18 class String; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace arc { | 21 namespace arc { |
| 22 | 22 |
| 23 using CanHandleResolutionCallback = base::Callback<void(bool)>; |
| 24 |
| 23 bool LaunchApp(content::BrowserContext* context, const std::string& app_id); | 25 bool LaunchApp(content::BrowserContext* context, const std::string& app_id); |
| 24 | 26 |
| 25 // Tests if the application can use the given target resolution. | 27 // Tests if the application can use the given target resolution. |
| 26 // The callback will receive the information once known. | 28 // The callback will receive the information once known. |
| 27 // A false will get returned if the result cannot be determined in which case | 29 // A false will get returned if the result cannot be determined in which case |
| 28 // the callback will not be called. | 30 // the callback will not be called. |
| 29 bool CanHandleResolution(content::BrowserContext* context, | 31 bool CanHandleResolution(content::BrowserContext* context, |
| 30 const std::string& app_id, | 32 const std::string& app_id, |
| 31 const gfx::Rect& rect, | 33 const gfx::Rect& rect, |
| 32 const CanHandleResolutionCallback callback); | 34 const CanHandleResolutionCallback& callback); |
| 35 |
| 36 // Uninstalls the package in ARC. |
| 37 void UninstallPackage(const std::string& package_name); |
| 33 | 38 |
| 34 } // namespace arc | 39 } // namespace arc |
| 35 | 40 |
| 36 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ | 41 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ |
| OLD | NEW |