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