| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 void SelectNumberedTab(int index); | 542 void SelectNumberedTab(int index); |
| 543 void SelectLastTab(); | 543 void SelectLastTab(); |
| 544 void DuplicateTab(); | 544 void DuplicateTab(); |
| 545 void WriteCurrentURLToClipboard(); | 545 void WriteCurrentURLToClipboard(); |
| 546 void ConvertPopupToTabbedBrowser(); | 546 void ConvertPopupToTabbedBrowser(); |
| 547 // In kiosk mode, the first toggle is valid, the rest is discarded. | 547 // In kiosk mode, the first toggle is valid, the rest is discarded. |
| 548 void ToggleFullscreenMode(); | 548 void ToggleFullscreenMode(); |
| 549 // See the description of | 549 // See the description of |
| 550 // FullscreenController::ToggleFullscreenModeWithExtension. | 550 // FullscreenController::ToggleFullscreenModeWithExtension. |
| 551 void ToggleFullscreenModeWithExtension(const GURL& extension_url); | 551 void ToggleFullscreenModeWithExtension(const GURL& extension_url); |
| 552 #if defined(OS_WIN) |
| 553 // See the description of FullscreenController::ToggleMetroSnapMode. |
| 554 void SetMetroSnapMode(bool enable); |
| 555 #endif |
| 552 #if defined(OS_MACOSX) | 556 #if defined(OS_MACOSX) |
| 553 void TogglePresentationMode(); | 557 void TogglePresentationMode(); |
| 554 #endif | 558 #endif |
| 555 void Exit(); | 559 void Exit(); |
| 556 | 560 |
| 557 // Page-related commands | 561 // Page-related commands |
| 558 void BookmarkCurrentPage(); | 562 void BookmarkCurrentPage(); |
| 559 void PinCurrentPageToStartScreen(); | 563 void PinCurrentPageToStartScreen(); |
| 560 void SavePage(); | 564 void SavePage(); |
| 561 void ViewSelectedSource(); | 565 void ViewSelectedSource(); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 // Change is the result of the bookmark bar pref changing. | 899 // Change is the result of the bookmark bar pref changing. |
| 896 BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE, | 900 BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE, |
| 897 | 901 |
| 898 // Change is the result of a state change in the active tab. | 902 // Change is the result of a state change in the active tab. |
| 899 BOOKMARK_BAR_STATE_CHANGE_TAB_STATE, | 903 BOOKMARK_BAR_STATE_CHANGE_TAB_STATE, |
| 900 | 904 |
| 901 // Change is the result of window toggling in/out of fullscreen mode. | 905 // Change is the result of window toggling in/out of fullscreen mode. |
| 902 BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN, | 906 BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN, |
| 903 }; | 907 }; |
| 904 | 908 |
| 909 enum FullScreenMode { |
| 910 // Not in fullscreen mode. |
| 911 FULLSCREEN_DISABLED, |
| 912 |
| 913 // Fullscreen mode, occupying the whole screen. |
| 914 FULLSCREEN_NORMAL, |
| 915 |
| 916 // Fullscreen mode for metro snap, occupying the full height and 20% of |
| 917 // the screen width. |
| 918 FULLSCREEN_METRO_SNAP, |
| 919 }; |
| 920 |
| 905 // Overridden from content::WebContentsDelegate: | 921 // Overridden from content::WebContentsDelegate: |
| 906 virtual content::WebContents* OpenURLFromTab( | 922 virtual content::WebContents* OpenURLFromTab( |
| 907 content::WebContents* source, | 923 content::WebContents* source, |
| 908 const content::OpenURLParams& params) OVERRIDE; | 924 const content::OpenURLParams& params) OVERRIDE; |
| 909 virtual void NavigationStateChanged(const content::WebContents* source, | 925 virtual void NavigationStateChanged(const content::WebContents* source, |
| 910 unsigned changed_flags) OVERRIDE; | 926 unsigned changed_flags) OVERRIDE; |
| 911 virtual void AddNewContents(content::WebContents* source, | 927 virtual void AddNewContents(content::WebContents* source, |
| 912 content::WebContents* new_contents, | 928 content::WebContents* new_contents, |
| 913 WindowOpenDisposition disposition, | 929 WindowOpenDisposition disposition, |
| 914 const gfx::Rect& initial_pos, | 930 const gfx::Rect& initial_pos, |
| (...skipping 189 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 |