| Index: chrome/browser/ui/extensions/application_launch.h
|
| diff --git a/chrome/browser/ui/extensions/application_launch.h b/chrome/browser/ui/extensions/application_launch.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7bb3dcc873e747e62f679b6d74f1f7c3625c6a9f
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/extensions/application_launch.h
|
| @@ -0,0 +1,76 @@
|
| +// Copyright (c) 2012 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_UI_EXTENSIONS_APPLICATION_LAUNCH_H_
|
| +#define CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_
|
| +#pragma once
|
| +
|
| +#include "chrome/common/extensions/extension_constants.h"
|
| +#include "webkit/glue/window_open_disposition.h"
|
| +
|
| +class Browser;
|
| +class GURL;
|
| +class Profile;
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| +namespace extensions {
|
| +class Extension;
|
| +}
|
| +
|
| +namespace application_launch {
|
| +
|
| +// Open |extension| in |container|, using |disposition| if container type is
|
| +// TAB. Returns the WebContents* that was created or NULL. If non-empty,
|
| +// |override_url| is used in place of the app launch url.
|
| +content::WebContents* OpenApplication(Profile* profile,
|
| + const extensions::Extension* extension,
|
| + extension_misc::LaunchContainer container,
|
| + const GURL& override_url,
|
| + WindowOpenDisposition disposition);
|
| +
|
| +#if defined(USE_ASH)
|
| +// Opens |url| in a new application panel window for the specified url.
|
| +content::WebContents* OpenApplicationPanel(
|
| + Profile* profile,
|
| + const extensions::Extension* extension,
|
| + const GURL& url);
|
| +#endif
|
| +
|
| +// Opens a new application window for the specified url. If |as_panel| is true,
|
| +// the application will be opened as a Browser::Type::APP_PANEL in app panel
|
| +// window, otherwise it will be opened as as either Browser::Type::APP a.k.a.
|
| +// "thin frame" (if |extension| is NULL) or Browser::Type::EXTENSION_APP (if
|
| +// |extension| is non-NULL)./ If |app_browser| is not NULL, it is set to the
|
| +// browser that hosts the returned tab.
|
| +content::WebContents* OpenApplicationWindow(
|
| + Profile* profile,
|
| + const extensions::Extension* extension,
|
| + extension_misc::LaunchContainer container,
|
| + const GURL& url,
|
| + Browser** app_browser);
|
| +
|
| +// Open |url| in an app shortcut window. If |update_shortcut| is true,
|
| +// update the name, description, and favicon of the shortcut.
|
| +// There are two kinds of app shortcuts: Shortcuts to a URL,
|
| +// and shortcuts that open an installed application. This function
|
| +// is used to open the former. To open the latter, use
|
| +// Browser::OpenApplicationWindow().
|
| +content::WebContents* OpenAppShortcutWindow(Profile* profile,
|
| + const GURL& url,
|
| + bool update_shortcut);
|
| +
|
| +// Open an application for |extension| using |disposition|. Returns NULL if
|
| +// there are no appropriate existing browser windows for |profile|. If
|
| +// non-empty, |override_url| is used in place of the app launch url.
|
| +content::WebContents* OpenApplicationTab(Profile* profile,
|
| + const extensions::Extension* extension,
|
| + const GURL& override_url,
|
| + WindowOpenDisposition disposition);
|
| +
|
| +} // namespace application_launch
|
| +
|
| +#endif // CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_
|
|
|