| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_WEB_APP_LAUNCHER_H__ | |
| 6 #define CHROME_BROWSER_WEB_APP_LAUNCHER_H__ | |
| 7 | |
| 8 #include "chrome/browser/gears_integration.h" | |
| 9 #include "googleurl/src/gurl.h" | |
| 10 | |
| 11 class Profile; | |
| 12 | |
| 13 // WebAppLauncher is used during startup to launch a web app (aka an installed | |
| 14 // app). | |
| 15 class WebAppLauncher { | |
| 16 public: | |
| 17 // Queries Gears for the name of the app, and when Gears callsback with the | |
| 18 // response creates a WebApp and Browser. | |
| 19 static void Launch(Profile* profile, const GURL& url); | |
| 20 | |
| 21 private: | |
| 22 WebAppLauncher(Profile* profile, const GURL& url); | |
| 23 | |
| 24 // Invoked from the Launch method. Queries Gears for the apps. Gears callback | |
| 25 // to OnGotApps. | |
| 26 void Run(); | |
| 27 | |
| 28 // Callback from Gears when list of apps is available. Creates WebApp and | |
| 29 // Browser. | |
| 30 void OnGotApps(GearsShortcutList* apps); | |
| 31 | |
| 32 Profile* profile_; | |
| 33 | |
| 34 // URL of the app. | |
| 35 const GURL url_; | |
| 36 | |
| 37 DISALLOW_EVIL_CONSTRUCTORS(WebAppLauncher); | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_BROWSER_WEB_APP_LAUNCHER_H__ | |
| 41 | |
| OLD | NEW |