Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: chrome/browser/ui/browser.h

Issue 6913026: Compact Navigation prototype (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added missing DropdownBarHostDelegate header file. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void MoveTabPrevious(); 478 void MoveTabPrevious();
479 void SelectNumberedTab(int index); 479 void SelectNumberedTab(int index);
480 void SelectLastTab(); 480 void SelectLastTab();
481 void DuplicateTab(); 481 void DuplicateTab();
482 void WriteCurrentURLToClipboard(); 482 void WriteCurrentURLToClipboard();
483 void ConvertPopupToTabbedBrowser(); 483 void ConvertPopupToTabbedBrowser();
484 // In kiosk mode, the first toggle is valid, the rest is discarded. 484 // In kiosk mode, the first toggle is valid, the rest is discarded.
485 void ToggleFullscreenMode(); 485 void ToggleFullscreenMode();
486 void Exit(); 486 void Exit();
487 #if defined(OS_CHROMEOS) 487 #if defined(OS_CHROMEOS)
488 void ToggleCompactNavigationBar();
489 void Search(); 488 void Search();
490 void ShowKeyboardOverlay(); 489 void ShowKeyboardOverlay();
491 #endif 490 #endif
492 491
493 // Page-related commands 492 // Page-related commands
494 void BookmarkCurrentPage(); 493 void BookmarkCurrentPage();
495 void SavePage(); 494 void SavePage();
496 void ViewSelectedSource(); 495 void ViewSelectedSource();
497 void ShowFindBar(); 496 void ShowFindBar();
498 497
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 void OpenLanguageOptionsDialog(); 578 void OpenLanguageOptionsDialog();
580 void OpenSystemTabAndActivate(); 579 void OpenSystemTabAndActivate();
581 void OpenMobilePlanTabAndActivate(); 580 void OpenMobilePlanTabAndActivate();
582 #endif 581 #endif
583 void OpenPluginsTabAndActivate(); 582 void OpenPluginsTabAndActivate();
584 583
585 virtual void UpdateDownloadShelfVisibility(bool visible); 584 virtual void UpdateDownloadShelfVisibility(bool visible);
586 585
587 // Overridden from TabStripModelDelegate: 586 // Overridden from TabStripModelDelegate:
588 virtual bool UseVerticalTabs() const; 587 virtual bool UseVerticalTabs() const;
588 virtual bool UseCompactNavigationBar() const;
589 589
590 ///////////////////////////////////////////////////////////////////////////// 590 /////////////////////////////////////////////////////////////////////////////
591 591
592 // Sets the value of homepage related prefs to new values. Since we do not 592 // Sets the value of homepage related prefs to new values. Since we do not
593 // want to change these values for existing users, we can not change the 593 // want to change these values for existing users, we can not change the
594 // default values under RegisterUserPrefs. Also if user already has an 594 // default values under RegisterUserPrefs. Also if user already has an
595 // existing profile we do not want to override those preferences so we only 595 // existing profile we do not want to override those preferences so we only
596 // set new values if they have not been set already. This method gets called 596 // set new values if they have not been set already. This method gets called
597 // during First Run. 597 // during First Run.
598 static void SetNewHomePagePrefs(PrefService* prefs); 598 static void SetNewHomePagePrefs(PrefService* prefs);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 virtual bool CanDuplicateContentsAt(int index); 700 virtual bool CanDuplicateContentsAt(int index);
701 virtual void DuplicateContentsAt(int index); 701 virtual void DuplicateContentsAt(int index);
702 virtual void CloseFrameAfterDragSession(); 702 virtual void CloseFrameAfterDragSession();
703 virtual void CreateHistoricalTab(TabContentsWrapper* contents); 703 virtual void CreateHistoricalTab(TabContentsWrapper* contents);
704 virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents); 704 virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents);
705 virtual bool CanCloseContents(std::vector<int>* indices); 705 virtual bool CanCloseContents(std::vector<int>* indices);
706 virtual bool CanBookmarkAllTabs() const; 706 virtual bool CanBookmarkAllTabs() const;
707 virtual void BookmarkAllTabs(); 707 virtual void BookmarkAllTabs();
708 virtual bool CanCloseTab() const; 708 virtual bool CanCloseTab() const;
709 virtual void ToggleUseVerticalTabs(); 709 virtual void ToggleUseVerticalTabs();
710 virtual void ToggleUseCompactNavigationBar();
710 virtual bool CanRestoreTab(); 711 virtual bool CanRestoreTab();
711 virtual void RestoreTab(); 712 virtual void RestoreTab();
712 virtual bool LargeIconsPermitted() const; 713 virtual bool LargeIconsPermitted() const;
713 714
714 // Overridden from TabStripModelObserver: 715 // Overridden from TabStripModelObserver:
715 virtual void TabInsertedAt(TabContentsWrapper* contents, 716 virtual void TabInsertedAt(TabContentsWrapper* contents,
716 int index, 717 int index,
717 bool foreground); 718 bool foreground);
718 virtual void TabClosingAt(TabStripModel* tab_strip_model, 719 virtual void TabClosingAt(TabStripModel* tab_strip_model,
719 TabContentsWrapper* contents, 720 TabContentsWrapper* contents,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition); 1026 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition);
1026 1027
1027 // Sets the insertion policy of the tabstrip based on whether vertical tabs 1028 // Sets the insertion policy of the tabstrip based on whether vertical tabs
1028 // are enabled. 1029 // are enabled.
1029 void UpdateTabStripModelInsertionPolicy(); 1030 void UpdateTabStripModelInsertionPolicy();
1030 1031
1031 // Invoked when the use vertical tabs preference changes. Resets the insertion 1032 // Invoked when the use vertical tabs preference changes. Resets the insertion
1032 // policy of the tab strip model and notifies the window. 1033 // policy of the tab strip model and notifies the window.
1033 void UseVerticalTabsChanged(); 1034 void UseVerticalTabsChanged();
1034 1035
1036 // Invoked when the use of the compact navigation bar preference changes.
1037 // Notifies the window.
1038 void UseCompactNavigationBarChanged();
1039
1035 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If 1040 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If
1036 // |check_fullscreen| is true, the set of features reflect the actual state of 1041 // |check_fullscreen| is true, the set of features reflect the actual state of
1037 // the browser, otherwise the set of features reflect the possible state of 1042 // the browser, otherwise the set of features reflect the possible state of
1038 // the browser. 1043 // the browser.
1039 bool SupportsWindowFeatureImpl(WindowFeature feature, 1044 bool SupportsWindowFeatureImpl(WindowFeature feature,
1040 bool check_fullscreen) const; 1045 bool check_fullscreen) const;
1041 1046
1042 // Determines if closing of browser can really be permitted after normal 1047 // Determines if closing of browser can really be permitted after normal
1043 // sequence of downloads and unload handlers have given the go-ahead to close. 1048 // sequence of downloads and unload handlers have given the go-ahead to close.
1044 // It is called from ShouldCloseWindow. It checks with 1049 // It is called from ShouldCloseWindow. It checks with
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 UPDATE_SHORTCUT // Update icon for app shortcut. 1193 UPDATE_SHORTCUT // Update icon for app shortcut.
1189 }; 1194 };
1190 1195
1191 // Which deferred action to perform when OnDidGetApplicationInfo is notified 1196 // Which deferred action to perform when OnDidGetApplicationInfo is notified
1192 // from a TabContents. Currently, only one pending action is allowed. 1197 // from a TabContents. Currently, only one pending action is allowed.
1193 WebAppAction pending_web_app_action_; 1198 WebAppAction pending_web_app_action_;
1194 1199
1195 // Tracks the display mode of the tabstrip. 1200 // Tracks the display mode of the tabstrip.
1196 mutable BooleanPrefMember use_vertical_tabs_; 1201 mutable BooleanPrefMember use_vertical_tabs_;
1197 1202
1203 // Tracks the display mode of the navigation bar.
1204 mutable BooleanPrefMember use_compact_navigation_bar_;
1205
1198 // The profile's tab restore service. The service is owned by the profile, 1206 // The profile's tab restore service. The service is owned by the profile,
1199 // and we install ourselves as an observer. 1207 // and we install ourselves as an observer.
1200 TabRestoreService* tab_restore_service_; 1208 TabRestoreService* tab_restore_service_;
1201 1209
1202 // Helper which implements the TabRestoreServiceDelegate interface. 1210 // Helper which implements the TabRestoreServiceDelegate interface.
1203 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; 1211 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_;
1204 1212
1205 scoped_ptr<InstantController> instant_; 1213 scoped_ptr<InstantController> instant_;
1206 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; 1214 scoped_ptr<InstantUnloadHandler> instant_unload_handler_;
1207 1215
1208 DISALLOW_COPY_AND_ASSIGN(Browser); 1216 DISALLOW_COPY_AND_ASSIGN(Browser);
1209 }; 1217 };
1210 1218
1211 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1219 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698