OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 void SelectNumberedTab(int index); | 544 void SelectNumberedTab(int index); |
545 void SelectLastTab(); | 545 void SelectLastTab(); |
546 void DuplicateTab(); | 546 void DuplicateTab(); |
547 void WriteCurrentURLToClipboard(); | 547 void WriteCurrentURLToClipboard(); |
548 void ConvertPopupToTabbedBrowser(); | 548 void ConvertPopupToTabbedBrowser(); |
549 // In kiosk mode, the first toggle is valid, the rest is discarded. | 549 // In kiosk mode, the first toggle is valid, the rest is discarded. |
550 void ToggleFullscreenMode(); | 550 void ToggleFullscreenMode(); |
551 // See the description of | 551 // See the description of |
552 // FullscreenController::ToggleFullscreenModeWithExtension. | 552 // FullscreenController::ToggleFullscreenModeWithExtension. |
553 void ToggleFullscreenModeWithExtension(const GURL& extension_url); | 553 void ToggleFullscreenModeWithExtension(const GURL& extension_url); |
| 554 #if defined(OS_WIN) |
| 555 // See the description of FullscreenController::ToggleMetroSnapMode. |
| 556 void SetMetroSnapMode(bool enable); |
| 557 #endif |
554 #if defined(OS_MACOSX) | 558 #if defined(OS_MACOSX) |
555 void TogglePresentationMode(); | 559 void TogglePresentationMode(); |
556 #endif | 560 #endif |
557 void Exit(); | 561 void Exit(); |
558 | 562 |
559 // Page-related commands | 563 // Page-related commands |
560 void BookmarkCurrentPage(); | 564 void BookmarkCurrentPage(); |
561 void PinCurrentPageToStartScreen(); | 565 void PinCurrentPageToStartScreen(); |
562 void SavePage(); | 566 void SavePage(); |
563 void ViewSelectedSource(); | 567 void ViewSelectedSource(); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 // Change is the result of the bookmark bar pref changing. | 901 // Change is the result of the bookmark bar pref changing. |
898 BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE, | 902 BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE, |
899 | 903 |
900 // Change is the result of a state change in the active tab. | 904 // Change is the result of a state change in the active tab. |
901 BOOKMARK_BAR_STATE_CHANGE_TAB_STATE, | 905 BOOKMARK_BAR_STATE_CHANGE_TAB_STATE, |
902 | 906 |
903 // Change is the result of window toggling in/out of fullscreen mode. | 907 // Change is the result of window toggling in/out of fullscreen mode. |
904 BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN, | 908 BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN, |
905 }; | 909 }; |
906 | 910 |
| 911 enum FullScreenMode { |
| 912 // Not in fullscreen mode. |
| 913 FULLSCREEN_DISABLED, |
| 914 |
| 915 // Fullscreen mode, occupying the whole screen. |
| 916 FULLSCREEN_NORMAL, |
| 917 |
| 918 // Fullscreen mode for metro snap, occupying the full height and 20% of |
| 919 // the screen width. |
| 920 FULLSCREEN_METRO_SNAP, |
| 921 }; |
| 922 |
907 // Overridden from content::WebContentsDelegate: | 923 // Overridden from content::WebContentsDelegate: |
908 virtual content::WebContents* OpenURLFromTab( | 924 virtual content::WebContents* OpenURLFromTab( |
909 content::WebContents* source, | 925 content::WebContents* source, |
910 const content::OpenURLParams& params) OVERRIDE; | 926 const content::OpenURLParams& params) OVERRIDE; |
911 virtual void NavigationStateChanged(const content::WebContents* source, | 927 virtual void NavigationStateChanged(const content::WebContents* source, |
912 unsigned changed_flags) OVERRIDE; | 928 unsigned changed_flags) OVERRIDE; |
913 virtual void AddNewContents(content::WebContents* source, | 929 virtual void AddNewContents(content::WebContents* source, |
914 content::WebContents* new_contents, | 930 content::WebContents* new_contents, |
915 WindowOpenDisposition disposition, | 931 WindowOpenDisposition disposition, |
916 const gfx::Rect& initial_pos, | 932 const gfx::Rect& initial_pos, |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 | 1120 |
1105 // Updates commands for bookmark editing. | 1121 // Updates commands for bookmark editing. |
1106 void UpdateCommandsForBookmarkEditing(); | 1122 void UpdateCommandsForBookmarkEditing(); |
1107 | 1123 |
1108 // Updates commands that affect the bookmark bar. | 1124 // Updates commands that affect the bookmark bar. |
1109 void UpdateCommandsForBookmarkBar(); | 1125 void UpdateCommandsForBookmarkBar(); |
1110 | 1126 |
1111 // Set the preference that indicates that the home page has been changed. | 1127 // Set the preference that indicates that the home page has been changed. |
1112 void MarkHomePageAsChanged(PrefService* pref_service); | 1128 void MarkHomePageAsChanged(PrefService* pref_service); |
1113 | 1129 |
1114 // Update commands whose state depends on whether the window is in fullscreen | 1130 // Update commands whose state depends on the type of fullscreen mode the |
1115 // mode. | 1131 // window is in. |
1116 void UpdateCommandsForFullscreenMode(bool is_fullscreen); | 1132 void UpdateCommandsForFullscreenMode(FullScreenMode fullscreen_mode); |
1117 | 1133 |
1118 // Update commands whose state depends on whether multiple profiles are | 1134 // Update commands whose state depends on whether multiple profiles are |
1119 // allowed. | 1135 // allowed. |
1120 void UpdateCommandsForMultipleProfiles(); | 1136 void UpdateCommandsForMultipleProfiles(); |
1121 | 1137 |
1122 // Updates the printing command state. | 1138 // Updates the printing command state. |
1123 void UpdatePrintingState(int content_restrictions); | 1139 void UpdatePrintingState(int content_restrictions); |
1124 | 1140 |
1125 // Updates the save-page-as command state. | 1141 // Updates the save-page-as command state. |
1126 void UpdateSaveAsState(int content_restrictions); | 1142 void UpdateSaveAsState(int content_restrictions); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 bool window_has_shown_; | 1461 bool window_has_shown_; |
1446 | 1462 |
1447 // Currently open color chooser. Non-NULL after OpenColorChooser is called and | 1463 // Currently open color chooser. Non-NULL after OpenColorChooser is called and |
1448 // before DidEndColorChooser is called. | 1464 // before DidEndColorChooser is called. |
1449 scoped_ptr<content::ColorChooser> color_chooser_; | 1465 scoped_ptr<content::ColorChooser> color_chooser_; |
1450 | 1466 |
1451 DISALLOW_COPY_AND_ASSIGN(Browser); | 1467 DISALLOW_COPY_AND_ASSIGN(Browser); |
1452 }; | 1468 }; |
1453 | 1469 |
1454 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1470 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
OLD | NEW |