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