| 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 | |
| 558 #if defined(OS_MACOSX) | 554 #if defined(OS_MACOSX) |
| 559 void TogglePresentationMode(); | 555 void TogglePresentationMode(); |
| 560 #endif | 556 #endif |
| 561 void Exit(); | 557 void Exit(); |
| 562 | 558 |
| 563 // Page-related commands | 559 // Page-related commands |
| 564 void BookmarkCurrentPage(); | 560 void BookmarkCurrentPage(); |
| 565 void PinCurrentPageToStartScreen(); | 561 void PinCurrentPageToStartScreen(); |
| 566 void SavePage(); | 562 void SavePage(); |
| 567 void ViewSelectedSource(); | 563 void ViewSelectedSource(); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 // Change is the result of the bookmark bar pref changing. | 897 // Change is the result of the bookmark bar pref changing. |
| 902 BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE, | 898 BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE, |
| 903 | 899 |
| 904 // Change is the result of a state change in the active tab. | 900 // Change is the result of a state change in the active tab. |
| 905 BOOKMARK_BAR_STATE_CHANGE_TAB_STATE, | 901 BOOKMARK_BAR_STATE_CHANGE_TAB_STATE, |
| 906 | 902 |
| 907 // Change is the result of window toggling in/out of fullscreen mode. | 903 // Change is the result of window toggling in/out of fullscreen mode. |
| 908 BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN, | 904 BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN, |
| 909 }; | 905 }; |
| 910 | 906 |
| 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 | |
| 923 // Overridden from content::WebContentsDelegate: | 907 // Overridden from content::WebContentsDelegate: |
| 924 virtual content::WebContents* OpenURLFromTab( | 908 virtual content::WebContents* OpenURLFromTab( |
| 925 content::WebContents* source, | 909 content::WebContents* source, |
| 926 const content::OpenURLParams& params) OVERRIDE; | 910 const content::OpenURLParams& params) OVERRIDE; |
| 927 virtual void NavigationStateChanged(const content::WebContents* source, | 911 virtual void NavigationStateChanged(const content::WebContents* source, |
| 928 unsigned changed_flags) OVERRIDE; | 912 unsigned changed_flags) OVERRIDE; |
| 929 virtual void AddNewContents(content::WebContents* source, | 913 virtual void AddNewContents(content::WebContents* source, |
| 930 content::WebContents* new_contents, | 914 content::WebContents* new_contents, |
| 931 WindowOpenDisposition disposition, | 915 WindowOpenDisposition disposition, |
| 932 const gfx::Rect& initial_pos, | 916 const gfx::Rect& initial_pos, |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 | 1104 |
| 1121 // Updates commands for bookmark editing. | 1105 // Updates commands for bookmark editing. |
| 1122 void UpdateCommandsForBookmarkEditing(); | 1106 void UpdateCommandsForBookmarkEditing(); |
| 1123 | 1107 |
| 1124 // Updates commands that affect the bookmark bar. | 1108 // Updates commands that affect the bookmark bar. |
| 1125 void UpdateCommandsForBookmarkBar(); | 1109 void UpdateCommandsForBookmarkBar(); |
| 1126 | 1110 |
| 1127 // Set the preference that indicates that the home page has been changed. | 1111 // Set the preference that indicates that the home page has been changed. |
| 1128 void MarkHomePageAsChanged(PrefService* pref_service); | 1112 void MarkHomePageAsChanged(PrefService* pref_service); |
| 1129 | 1113 |
| 1130 // Update commands whose state depends on the type of fullscreen mode the | 1114 // Update commands whose state depends on whether the window is in fullscreen |
| 1131 // window is in. | 1115 // mode. |
| 1132 void UpdateCommandsForFullscreenMode(FullScreenMode fullscreen_mode); | 1116 void UpdateCommandsForFullscreenMode(bool is_fullscreen); |
| 1133 | 1117 |
| 1134 // Update commands whose state depends on whether multiple profiles are | 1118 // Update commands whose state depends on whether multiple profiles are |
| 1135 // allowed. | 1119 // allowed. |
| 1136 void UpdateCommandsForMultipleProfiles(); | 1120 void UpdateCommandsForMultipleProfiles(); |
| 1137 | 1121 |
| 1138 // Updates the printing command state. | 1122 // Updates the printing command state. |
| 1139 void UpdatePrintingState(int content_restrictions); | 1123 void UpdatePrintingState(int content_restrictions); |
| 1140 | 1124 |
| 1141 // Updates the save-page-as command state. | 1125 // Updates the save-page-as command state. |
| 1142 void UpdateSaveAsState(int content_restrictions); | 1126 void UpdateSaveAsState(int content_restrictions); |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 bool window_has_shown_; | 1445 bool window_has_shown_; |
| 1462 | 1446 |
| 1463 // Currently open color chooser. Non-NULL after OpenColorChooser is called and | 1447 // Currently open color chooser. Non-NULL after OpenColorChooser is called and |
| 1464 // before DidEndColorChooser is called. | 1448 // before DidEndColorChooser is called. |
| 1465 scoped_ptr<content::ColorChooser> color_chooser_; | 1449 scoped_ptr<content::ColorChooser> color_chooser_; |
| 1466 | 1450 |
| 1467 DISALLOW_COPY_AND_ASSIGN(Browser); | 1451 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 1468 }; | 1452 }; |
| 1469 | 1453 |
| 1470 #endif // CHROME_BROWSER_UI_BROWSER_H_ | 1454 #endif // CHROME_BROWSER_UI_BROWSER_H_ |
| OLD | NEW |