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..7342d7fe16a2b42bac2ef5df51f675361cc44f9b |
--- /dev/null |
+++ b/chrome/browser/ui/extensions/application_launch.h |
@@ -0,0 +1,72 @@ |
+// 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 Extension; |
+class Profile; |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace ApplicationLaunch { |
sky
2012/05/18 16:04:02
namespaces are typically lower case, eg applicatio
benwells
2012/05/21 03:25:54
Of course ... I must have looked at too much WebKi
|
+ |
+// 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 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 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 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 Extension* extension, |
+ const GURL& override_url, |
+ WindowOpenDisposition disposition); |
+ |
+} // namespace ApplicationLaunch |
+ |
+#endif // CHROME_BROWSER_UI_EXTENSIONS_APPLICATION_LAUNCH_H_ |