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