| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 void Exit(); | 468 void Exit(); |
| 469 #if defined(OS_CHROMEOS) | 469 #if defined(OS_CHROMEOS) |
| 470 void ToggleCompactNavigationBar(); | 470 void ToggleCompactNavigationBar(); |
| 471 void Search(); | 471 void Search(); |
| 472 void ShowKeyboardOverlay(); | 472 void ShowKeyboardOverlay(); |
| 473 #endif | 473 #endif |
| 474 | 474 |
| 475 // Page-related commands | 475 // Page-related commands |
| 476 void BookmarkCurrentPage(); | 476 void BookmarkCurrentPage(); |
| 477 void SavePage(); | 477 void SavePage(); |
| 478 void ViewSource(); | 478 void ViewSelectedSource(); |
| 479 void ShowFindBar(); | 479 void ShowFindBar(); |
| 480 | 480 |
| 481 // Returns true if the Browser supports the specified feature. The value of | 481 // Returns true if the Browser supports the specified feature. The value of |
| 482 // this varies during the lifetime of the browser. For example, if the window | 482 // this varies during the lifetime of the browser. For example, if the window |
| 483 // is fullscreen this may return a different value. If you only care about | 483 // is fullscreen this may return a different value. If you only care about |
| 484 // whether or not it's possible for the browser to support a particular | 484 // whether or not it's possible for the browser to support a particular |
| 485 // feature use |CanSupportWindowFeature|. | 485 // feature use |CanSupportWindowFeature|. |
| 486 bool SupportsWindowFeature(WindowFeature feature) const; | 486 bool SupportsWindowFeature(WindowFeature feature) const; |
| 487 | 487 |
| 488 // Returns true if the Browser can support the specified feature. See comment | 488 // Returns true if the Browser can support the specified feature. See comment |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 virtual void ConfirmSetDefaultSearchProvider( | 771 virtual void ConfirmSetDefaultSearchProvider( |
| 772 TabContents* tab_contents, | 772 TabContents* tab_contents, |
| 773 TemplateURL* template_url, | 773 TemplateURL* template_url, |
| 774 TemplateURLModel* template_url_model); | 774 TemplateURLModel* template_url_model); |
| 775 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, | 775 virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, |
| 776 Profile* profile); | 776 Profile* profile); |
| 777 virtual void ShowPageInfo(Profile* profile, | 777 virtual void ShowPageInfo(Profile* profile, |
| 778 const GURL& url, | 778 const GURL& url, |
| 779 const NavigationEntry::SSLStatus& ssl, | 779 const NavigationEntry::SSLStatus& ssl, |
| 780 bool show_history); | 780 bool show_history); |
| 781 virtual void ViewSourceForTab(TabContents* source); |
| 781 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 782 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 782 bool* is_keyboard_shortcut); | 783 bool* is_keyboard_shortcut); |
| 783 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 784 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 784 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); | 785 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); |
| 785 virtual void ShowContentSettingsWindow(ContentSettingsType content_type); | 786 virtual void ShowContentSettingsWindow(ContentSettingsType content_type); |
| 786 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents); | 787 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents); |
| 787 virtual bool ShouldAddNavigationToHistory( | 788 virtual bool ShouldAddNavigationToHistory( |
| 788 const history::HistoryAddPageArgs& add_page_args, | 789 const history::HistoryAddPageArgs& add_page_args, |
| 789 NavigationType::Type navigation_type); | 790 NavigationType::Type navigation_type); |
| 790 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, | 791 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 // cancel closing of window. | 980 // cancel closing of window. |
| 980 bool IsClosingPermitted(); | 981 bool IsClosingPermitted(); |
| 981 | 982 |
| 982 // Commits the current instant, returning true on success. This is intended | 983 // Commits the current instant, returning true on success. This is intended |
| 983 // for use from OpenCurrentURL. | 984 // for use from OpenCurrentURL. |
| 984 bool OpenInstant(WindowOpenDisposition disposition); | 985 bool OpenInstant(WindowOpenDisposition disposition); |
| 985 | 986 |
| 986 // If this browser should have instant one is created, otherwise does nothing. | 987 // If this browser should have instant one is created, otherwise does nothing. |
| 987 void CreateInstantIfNecessary(); | 988 void CreateInstantIfNecessary(); |
| 988 | 989 |
| 990 // Opens view-source tab for given tab contents. |
| 991 void ViewSource(TabContentsWrapper* tab); |
| 992 |
| 993 // Inserts contents dupe next to the original contents. This method is used |
| 994 // to insert duplicate tab and view source tab next to the original tab. |
| 995 void InsertContentsDupe( |
| 996 TabContentsWrapper* original_content, |
| 997 TabContentsWrapper* clone_content); |
| 998 |
| 989 // Data members ///////////////////////////////////////////////////////////// | 999 // Data members ///////////////////////////////////////////////////////////// |
| 990 | 1000 |
| 991 NotificationRegistrar registrar_; | 1001 NotificationRegistrar registrar_; |
| 992 | 1002 |
| 993 // This Browser's type. | 1003 // This Browser's type. |
| 994 const Type type_; | 1004 const Type type_; |
| 995 | 1005 |
| 996 // This Browser's profile. | 1006 // This Browser's profile. |
| 997 Profile* const profile_; | 1007 Profile* const profile_; |
| 998 | 1008 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 // and we install ourselves as an observer. | 1130 // and we install ourselves as an observer. |
| 1121 TabRestoreService* tab_restore_service_; | 1131 TabRestoreService* tab_restore_service_; |
| 1122 | 1132 |
| 1123 scoped_ptr<InstantController> instant_; | 1133 scoped_ptr<InstantController> instant_; |
| 1124 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; | 1134 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; |
| 1125 | 1135 |
| 1126 DISALLOW_COPY_AND_ASSIGN(Browser); | 1136 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1127 }; | 1137 }; |
| 1128 | 1138 |
| 1129 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1139 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |