| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 Profile* profile, | 238 Profile* profile, |
| 239 const Extension* extension, | 239 const Extension* extension, |
| 240 extension_misc::LaunchContainer container, | 240 extension_misc::LaunchContainer container, |
| 241 TabContents* existing_tab); | 241 TabContents* existing_tab); |
| 242 | 242 |
| 243 // Opens a new application window for the specified url. If |as_panel| | 243 // Opens a new application window for the specified url. If |as_panel| |
| 244 // is true, the application will be opened as a Browser::Type::APP_PANEL in | 244 // is true, the application will be opened as a Browser::Type::APP_PANEL in |
| 245 // app panel window, otherwise it will be opened as as either | 245 // app panel window, otherwise it will be opened as as either |
| 246 // Browser::Type::APP a.k.a. "thin frame" (if |extension| is NULL) or | 246 // Browser::Type::APP a.k.a. "thin frame" (if |extension| is NULL) or |
| 247 // Browser::Type::EXTENSION_APP (if |extension| is non-NULL). | 247 // Browser::Type::EXTENSION_APP (if |extension| is non-NULL). |
| 248 // If |app_browser| is not NULL, it is set to the browser that hosts the |
| 249 // returned tab. |
| 248 static TabContents* OpenApplicationWindow( | 250 static TabContents* OpenApplicationWindow( |
| 249 Profile* profile, | 251 Profile* profile, |
| 250 const Extension* extension, | 252 const Extension* extension, |
| 251 extension_misc::LaunchContainer container, | 253 extension_misc::LaunchContainer container, |
| 252 const GURL& url); | 254 const GURL& url, |
| 255 Browser** app_browser); |
| 253 | 256 |
| 254 // Open an application in a new application window. Used to implement | 257 // Open |url| in an app shortcut window. If |update_shortcut| is true, |
| 255 // app shortcuts. | 258 // update the name, description, and favicon of the shortcut. |
| 256 static TabContents* OpenApplicationWindow(Profile* profile, const GURL& url); | 259 // There are two kinds of app shortcuts: Shortcuts to a URL, |
| 260 // and shortcuts that open an installed application. This function |
| 261 // is used to open the former. To open the latter, use |
| 262 // Browser::OpenApplicationWindow(). |
| 263 static TabContents* OpenAppShortcutWindow(Profile* profile, |
| 264 const GURL& url, |
| 265 bool update_shortcut); |
| 257 | 266 |
| 258 // Open an application for |extension| in a new application tab, or | 267 // Open an application for |extension| in a new application tab, or |
| 259 // |existing_tab| if not NULL. Returns NULL if there are no appropriate | 268 // |existing_tab| if not NULL. Returns NULL if there are no appropriate |
| 260 // existing browser windows for |profile|. | 269 // existing browser windows for |profile|. |
| 261 static TabContents* OpenApplicationTab(Profile* profile, | 270 static TabContents* OpenApplicationTab(Profile* profile, |
| 262 const Extension* extension, | 271 const Extension* extension, |
| 263 TabContents* existing_tab); | 272 TabContents* existing_tab); |
| 264 | 273 |
| 265 // Opens a new window and opens the bookmark manager. | 274 // Opens a new window and opens the bookmark manager. |
| 266 static void OpenBookmarkManagerWindow(Profile* profile); | 275 static void OpenBookmarkManagerWindow(Profile* profile); |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 // The profile's tab restore service. The service is owned by the profile, | 1117 // The profile's tab restore service. The service is owned by the profile, |
| 1109 // and we install ourselves as an observer. | 1118 // and we install ourselves as an observer. |
| 1110 TabRestoreService* tab_restore_service_; | 1119 TabRestoreService* tab_restore_service_; |
| 1111 | 1120 |
| 1112 scoped_ptr<InstantController> instant_; | 1121 scoped_ptr<InstantController> instant_; |
| 1113 | 1122 |
| 1114 DISALLOW_COPY_AND_ASSIGN(Browser); | 1123 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1115 }; | 1124 }; |
| 1116 | 1125 |
| 1117 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1126 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |