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_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // or NULL. | 220 // or NULL. |
221 static TabContents* OpenApplication(Profile* profile, | 221 static TabContents* OpenApplication(Profile* profile, |
222 Extension* extension, | 222 Extension* extension, |
223 Extension::LaunchContainer container); | 223 Extension::LaunchContainer container); |
224 | 224 |
225 // Opens a new application window for the specified url. If |as_panel| | 225 // Opens a new application window for the specified url. If |as_panel| |
226 // is true, the application will be opened as a Browser::Type::APP_PANEL in | 226 // is true, the application will be opened as a Browser::Type::APP_PANEL in |
227 // app panel window, otherwise it will be opened as as either | 227 // app panel window, otherwise it will be opened as as either |
228 // Browser::Type::APP a.k.a. "thin frame" (if |extension| is NULL) or | 228 // Browser::Type::APP a.k.a. "thin frame" (if |extension| is NULL) or |
229 // Browser::Type::EXTENSION_APP (if |extension| is non-NULL). | 229 // Browser::Type::EXTENSION_APP (if |extension| is non-NULL). |
| 230 // Returns the browser hosting for the TabContents via optional parameter, |
| 231 // |browser|. |
230 static TabContents* OpenApplicationWindow( | 232 static TabContents* OpenApplicationWindow( |
231 Profile* profile, | 233 Profile* profile, |
232 Extension* extension, | 234 Extension* extension, |
233 Extension::LaunchContainer container, | 235 Extension::LaunchContainer container, |
234 const GURL& url); | 236 const GURL& url, |
| 237 Browser** browser); |
235 | 238 |
236 // Open an application for |extension| in a new application window or panel. | 239 // Open an application for |extension| in a new application window or panel. |
| 240 // Returns the browser hosting the TabContents via optional parameter, |
| 241 // |browser|. |
237 static TabContents* OpenApplicationWindow(Profile* profile, | 242 static TabContents* OpenApplicationWindow(Profile* profile, |
238 GURL& url); | 243 GURL& url, |
| 244 Browser** browser); |
239 | 245 |
240 // Open an application for |extension| in a new application tab. Returns | 246 // Open an application for |extension| in a new application tab. Returns |
241 // NULL if there are no appropriate existing browser windows for |profile|. | 247 // NULL if there are no appropriate existing browser windows for |profile|. |
| 248 // Returns the browser hosting the TabContents via optional parameter, |
| 249 // |browser|. |
242 static TabContents* OpenApplicationTab(Profile* profile, | 250 static TabContents* OpenApplicationTab(Profile* profile, |
243 Extension* extension); | 251 Extension* extension, |
| 252 Browser** browser); |
244 | 253 |
245 // Opens a new window and opens the bookmark manager. | 254 // Opens a new window and opens the bookmark manager. |
246 static void OpenBookmarkManagerWindow(Profile* profile); | 255 static void OpenBookmarkManagerWindow(Profile* profile); |
247 | 256 |
248 #if defined(OS_MACOSX) | 257 #if defined(OS_MACOSX) |
249 // Open a new window with history/downloads/help/options (needed on Mac when | 258 // Open a new window with history/downloads/help/options (needed on Mac when |
250 // there are no windows). | 259 // there are no windows). |
251 static void OpenHistoryWindow(Profile* profile); | 260 static void OpenHistoryWindow(Profile* profile); |
252 static void OpenDownloadsWindow(Profile* profile); | 261 static void OpenDownloadsWindow(Profile* profile); |
253 static void OpenHelpWindow(Profile* profile); | 262 static void OpenHelpWindow(Profile* profile); |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 virtual void CloseFrameAfterDragSession(); | 657 virtual void CloseFrameAfterDragSession(); |
649 virtual void CreateHistoricalTab(TabContents* contents); | 658 virtual void CreateHistoricalTab(TabContents* contents); |
650 virtual bool RunUnloadListenerBeforeClosing(TabContents* contents); | 659 virtual bool RunUnloadListenerBeforeClosing(TabContents* contents); |
651 virtual bool CanCloseContentsAt(int index); | 660 virtual bool CanCloseContentsAt(int index); |
652 virtual bool CanBookmarkAllTabs() const; | 661 virtual bool CanBookmarkAllTabs() const; |
653 virtual void BookmarkAllTabs(); | 662 virtual void BookmarkAllTabs(); |
654 virtual bool CanCloseTab() const; | 663 virtual bool CanCloseTab() const; |
655 virtual void ToggleUseVerticalTabs(); | 664 virtual void ToggleUseVerticalTabs(); |
656 virtual bool CanRestoreTab(); | 665 virtual bool CanRestoreTab(); |
657 virtual void RestoreTab(); | 666 virtual void RestoreTab(); |
| 667 virtual bool LargeIconsPermitted() const; |
658 | 668 |
659 // Overridden from TabStripModelObserver: | 669 // Overridden from TabStripModelObserver: |
660 virtual void TabInsertedAt(TabContents* contents, | 670 virtual void TabInsertedAt(TabContents* contents, |
661 int index, | 671 int index, |
662 bool foreground); | 672 bool foreground); |
663 virtual void TabClosingAt(TabContents* contents, int index); | 673 virtual void TabClosingAt(TabContents* contents, int index); |
664 virtual void TabDetachedAt(TabContents* contents, int index); | 674 virtual void TabDetachedAt(TabContents* contents, int index); |
665 virtual void TabDeselectedAt(TabContents* contents, int index); | 675 virtual void TabDeselectedAt(TabContents* contents, int index); |
666 virtual void TabSelectedAt(TabContents* old_contents, | 676 virtual void TabSelectedAt(TabContents* old_contents, |
667 TabContents* new_contents, | 677 TabContents* new_contents, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 bool show_history); | 737 bool show_history); |
728 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 738 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
729 bool* is_keyboard_shortcut); | 739 bool* is_keyboard_shortcut); |
730 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 740 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
731 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); | 741 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); |
732 virtual void ShowContentSettingsWindow(ContentSettingsType content_type); | 742 virtual void ShowContentSettingsWindow(ContentSettingsType content_type); |
733 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents); | 743 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents); |
734 virtual bool ShouldAddNavigationsToHistory() const; | 744 virtual bool ShouldAddNavigationsToHistory() const; |
735 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, | 745 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, |
736 int32 page_id); | 746 int32 page_id); |
737 virtual Browser* GetBrowser(); | |
738 virtual void ContentTypeChanged(TabContents* source); | 747 virtual void ContentTypeChanged(TabContents* source); |
739 | 748 |
740 // Overridden from SelectFileDialog::Listener: | 749 // Overridden from SelectFileDialog::Listener: |
741 virtual void FileSelected(const FilePath& path, int index, void* params); | 750 virtual void FileSelected(const FilePath& path, int index, void* params); |
742 | 751 |
743 // Overridden from NotificationObserver: | 752 // Overridden from NotificationObserver: |
744 virtual void Observe(NotificationType type, | 753 virtual void Observe(NotificationType type, |
745 const NotificationSource& source, | 754 const NotificationSource& source, |
746 const NotificationDetails& details); | 755 const NotificationDetails& details); |
747 | 756 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 mutable BooleanPrefMember use_vertical_tabs_; | 1077 mutable BooleanPrefMember use_vertical_tabs_; |
1069 | 1078 |
1070 // The profile's tab restore service. The service is owned by the profile, | 1079 // The profile's tab restore service. The service is owned by the profile, |
1071 // and we install ourselves as an observer. | 1080 // and we install ourselves as an observer. |
1072 TabRestoreService* tab_restore_service_; | 1081 TabRestoreService* tab_restore_service_; |
1073 | 1082 |
1074 DISALLOW_COPY_AND_ASSIGN(Browser); | 1083 DISALLOW_COPY_AND_ASSIGN(Browser); |
1075 }; | 1084 }; |
1076 | 1085 |
1077 #endif // CHROME_BROWSER_BROWSER_H_ | 1086 #endif // CHROME_BROWSER_BROWSER_H_ |
OLD | NEW |