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

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: 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 void MoveTabPrevious(); 472 void MoveTabPrevious();
473 void SelectNumberedTab(int index); 473 void SelectNumberedTab(int index);
474 void SelectLastTab(); 474 void SelectLastTab();
475 void DuplicateTab(); 475 void DuplicateTab();
476 void WriteCurrentURLToClipboard(); 476 void WriteCurrentURLToClipboard();
477 void ConvertPopupToTabbedBrowser(); 477 void ConvertPopupToTabbedBrowser();
478 // In kiosk mode, the first toggle is valid, the rest is discarded. 478 // In kiosk mode, the first toggle is valid, the rest is discarded.
479 void ToggleFullscreenMode(); 479 void ToggleFullscreenMode();
480 void Exit(); 480 void Exit();
481 #if defined(OS_CHROMEOS) 481 #if defined(OS_CHROMEOS)
482 void ToggleCompactNavigationBar();
483 void Search(); 482 void Search();
484 void ShowKeyboardOverlay(); 483 void ShowKeyboardOverlay();
485 #endif 484 #endif
486 485
487 // Page-related commands 486 // Page-related commands
488 void BookmarkCurrentPage(); 487 void BookmarkCurrentPage();
489 void SavePage(); 488 void SavePage();
490 void ViewSelectedSource(); 489 void ViewSelectedSource();
491 void ShowFindBar(); 490 void ShowFindBar();
492 491
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 void OpenLanguageOptionsDialog(); 572 void OpenLanguageOptionsDialog();
574 void OpenSystemTabAndActivate(); 573 void OpenSystemTabAndActivate();
575 void OpenMobilePlanTabAndActivate(); 574 void OpenMobilePlanTabAndActivate();
576 #endif 575 #endif
577 void OpenPluginsTabAndActivate(); 576 void OpenPluginsTabAndActivate();
578 577
579 virtual void UpdateDownloadShelfVisibility(bool visible); 578 virtual void UpdateDownloadShelfVisibility(bool visible);
580 579
581 // Overridden from TabStripModelDelegate: 580 // Overridden from TabStripModelDelegate:
582 virtual bool UseVerticalTabs() const; 581 virtual bool UseVerticalTabs() const;
582 virtual bool UseCompactNavigationBar() const;
583 583
584 ///////////////////////////////////////////////////////////////////////////// 584 /////////////////////////////////////////////////////////////////////////////
585 585
586 // Sets the value of homepage related prefs to new values. Since we do not 586 // Sets the value of homepage related prefs to new values. Since we do not
587 // want to change these values for existing users, we can not change the 587 // want to change these values for existing users, we can not change the
588 // default values under RegisterUserPrefs. Also if user already has an 588 // default values under RegisterUserPrefs. Also if user already has an
589 // existing profile we do not want to override those preferences so we only 589 // existing profile we do not want to override those preferences so we only
590 // set new values if they have not been set already. This method gets called 590 // set new values if they have not been set already. This method gets called
591 // during First Run. 591 // during First Run.
592 static void SetNewHomePagePrefs(PrefService* prefs); 592 static void SetNewHomePagePrefs(PrefService* prefs);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 virtual bool CanDuplicateContentsAt(int index); 694 virtual bool CanDuplicateContentsAt(int index);
695 virtual void DuplicateContentsAt(int index); 695 virtual void DuplicateContentsAt(int index);
696 virtual void CloseFrameAfterDragSession(); 696 virtual void CloseFrameAfterDragSession();
697 virtual void CreateHistoricalTab(TabContentsWrapper* contents); 697 virtual void CreateHistoricalTab(TabContentsWrapper* contents);
698 virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents); 698 virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents);
699 virtual bool CanCloseContents(std::vector<int>* indices); 699 virtual bool CanCloseContents(std::vector<int>* indices);
700 virtual bool CanBookmarkAllTabs() const; 700 virtual bool CanBookmarkAllTabs() const;
701 virtual void BookmarkAllTabs(); 701 virtual void BookmarkAllTabs();
702 virtual bool CanCloseTab() const; 702 virtual bool CanCloseTab() const;
703 virtual void ToggleUseVerticalTabs(); 703 virtual void ToggleUseVerticalTabs();
704 virtual void ToggleUseCompactNavigationBar();
704 virtual bool CanRestoreTab(); 705 virtual bool CanRestoreTab();
705 virtual void RestoreTab(); 706 virtual void RestoreTab();
706 virtual bool LargeIconsPermitted() const; 707 virtual bool LargeIconsPermitted() const;
707 708
708 // Overridden from TabStripModelObserver: 709 // Overridden from TabStripModelObserver:
709 virtual void TabInsertedAt(TabContentsWrapper* contents, 710 virtual void TabInsertedAt(TabContentsWrapper* contents,
710 int index, 711 int index,
711 bool foreground); 712 bool foreground);
712 virtual void TabClosingAt(TabStripModel* tab_strip_model, 713 virtual void TabClosingAt(TabStripModel* tab_strip_model,
713 TabContentsWrapper* contents, 714 TabContentsWrapper* contents,
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition); 1010 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition);
1010 1011
1011 // Sets the insertion policy of the tabstrip based on whether vertical tabs 1012 // Sets the insertion policy of the tabstrip based on whether vertical tabs
1012 // are enabled. 1013 // are enabled.
1013 void UpdateTabStripModelInsertionPolicy(); 1014 void UpdateTabStripModelInsertionPolicy();
1014 1015
1015 // Invoked when the use vertical tabs preference changes. Resets the insertion 1016 // Invoked when the use vertical tabs preference changes. Resets the insertion
1016 // policy of the tab strip model and notifies the window. 1017 // policy of the tab strip model and notifies the window.
1017 void UseVerticalTabsChanged(); 1018 void UseVerticalTabsChanged();
1018 1019
1020 // Invoked when the use of the compact navigation bar preference changes.
1021 // Notifies the window.
1022 void UseCompactNavigationBarChanged();
1023
1019 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If 1024 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If
1020 // |check_fullscreen| is true, the set of features reflect the actual state of 1025 // |check_fullscreen| is true, the set of features reflect the actual state of
1021 // the browser, otherwise the set of features reflect the possible state of 1026 // the browser, otherwise the set of features reflect the possible state of
1022 // the browser. 1027 // the browser.
1023 bool SupportsWindowFeatureImpl(WindowFeature feature, 1028 bool SupportsWindowFeatureImpl(WindowFeature feature,
1024 bool check_fullscreen) const; 1029 bool check_fullscreen) const;
1025 1030
1026 // Determines if closing of browser can really be permitted after normal 1031 // Determines if closing of browser can really be permitted after normal
1027 // sequence of downloads and unload handlers have given the go-ahead to close. 1032 // sequence of downloads and unload handlers have given the go-ahead to close.
1028 // It is called from ShouldCloseWindow. It checks with 1033 // It is called from ShouldCloseWindow. It checks with
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 UPDATE_SHORTCUT // Update icon for app shortcut. 1175 UPDATE_SHORTCUT // Update icon for app shortcut.
1171 }; 1176 };
1172 1177
1173 // Which deferred action to perform when OnDidGetApplicationInfo is notified 1178 // Which deferred action to perform when OnDidGetApplicationInfo is notified
1174 // from a TabContents. Currently, only one pending action is allowed. 1179 // from a TabContents. Currently, only one pending action is allowed.
1175 WebAppAction pending_web_app_action_; 1180 WebAppAction pending_web_app_action_;
1176 1181
1177 // Tracks the display mode of the tabstrip. 1182 // Tracks the display mode of the tabstrip.
1178 mutable BooleanPrefMember use_vertical_tabs_; 1183 mutable BooleanPrefMember use_vertical_tabs_;
1179 1184
1185 // Tracks the display mode of the navigation bar.
1186 mutable BooleanPrefMember use_compact_navigation_bar_;
1187
1180 // The profile's tab restore service. The service is owned by the profile, 1188 // The profile's tab restore service. The service is owned by the profile,
1181 // and we install ourselves as an observer. 1189 // and we install ourselves as an observer.
1182 TabRestoreService* tab_restore_service_; 1190 TabRestoreService* tab_restore_service_;
1183 1191
1184 // Helper which implements the TabRestoreServiceDelegate interface. 1192 // Helper which implements the TabRestoreServiceDelegate interface.
1185 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; 1193 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_;
1186 1194
1187 scoped_ptr<InstantController> instant_; 1195 scoped_ptr<InstantController> instant_;
1188 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; 1196 scoped_ptr<InstantUnloadHandler> instant_unload_handler_;
1189 1197
1190 DISALLOW_COPY_AND_ASSIGN(Browser); 1198 DISALLOW_COPY_AND_ASSIGN(Browser);
1191 }; 1199 };
1192 1200
1193 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1201 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698