 Chromium Code Reviews
 Chromium Code Reviews Issue 1756193008:
  Support uninstalling ARC app from Chrome launcher  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1756193008:
  Support uninstalling ARC app from Chrome launcher  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 mojo { | |
| 18 class String; | |
| 19 } | |
| 20 | |
| 17 namespace arc { | 21 namespace arc { | 
| 18 using CanHandleResolutionCallback = base::Callback<void(bool)>; | 22 using CanHandleResolutionCallback = base::Callback<void(bool)>; | 
| 23 using UninstallAppCallback = base::Callback<void(const mojo::String&)>; | |
| 19 } | 24 } | 
| 20 | 25 | 
| 21 namespace arc { | 26 namespace arc { | 
| 
xiyuan
2016/03/08 16:40:11
nit: Can we combine this with the one started at l
 
victorhsieh0
2016/03/08 18:02:52
Done.
 | |
| 22 | 27 | 
| 23 bool LaunchApp(content::BrowserContext* context, const std::string& app_id); | 28 bool LaunchApp(content::BrowserContext* context, const std::string& app_id); | 
| 24 | 29 | 
| 25 // Tests if the application can use the given target resolution. | 30 // Tests if the application can use the given target resolution. | 
| 26 // The callback will receive the information once known. | 31 // The callback will receive the information once known. | 
| 27 // A false will get returned if the result cannot be determined in which case | 32 // A false will get returned if the result cannot be determined in which case | 
| 28 // the callback will not be called. | 33 // the callback will not be called. | 
| 29 bool CanHandleResolution(content::BrowserContext* context, | 34 bool CanHandleResolution(content::BrowserContext* context, | 
| 30 const std::string& app_id, | 35 const std::string& app_id, | 
| 31 const gfx::Rect& rect, | 36 const gfx::Rect& rect, | 
| 32 const CanHandleResolutionCallback callback); | 37 const CanHandleResolutionCallback& callback); | 
| 38 | |
| 39 // Uninstalls the package in ARC. | |
| 40 bool UninstallApp(const std::string& package_name, | |
| 41 const UninstallAppCallback& callback); | |
| 42 void OnUninstallAppResponse(const mojo::String& error_message); | |
| 33 | 43 | 
| 34 } // namespace arc | 44 } // namespace arc | 
| 35 | 45 | 
| 36 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ | 46 #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_UTILS_H_ | 
| OLD | NEW |