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

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: Clang build fix. After commit/revert. 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
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_unittest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 void OpenLanguageOptionsDialog(); 575 void OpenLanguageOptionsDialog();
577 void OpenSystemTabAndActivate(); 576 void OpenSystemTabAndActivate();
578 void OpenMobilePlanTabAndActivate(); 577 void OpenMobilePlanTabAndActivate();
579 #endif 578 #endif
580 void OpenPluginsTabAndActivate(); 579 void OpenPluginsTabAndActivate();
581 580
582 virtual void UpdateDownloadShelfVisibility(bool visible); 581 virtual void UpdateDownloadShelfVisibility(bool visible);
583 582
584 // Overridden from TabStripModelDelegate: 583 // Overridden from TabStripModelDelegate:
585 virtual bool UseVerticalTabs() const; 584 virtual bool UseVerticalTabs() const;
585 virtual bool UseCompactNavigationBar() const;
586 586
587 ///////////////////////////////////////////////////////////////////////////// 587 /////////////////////////////////////////////////////////////////////////////
588 588
589 // Sets the value of homepage related prefs to new values. Since we do not 589 // Sets the value of homepage related prefs to new values. Since we do not
590 // want to change these values for existing users, we can not change the 590 // want to change these values for existing users, we can not change the
591 // default values under RegisterUserPrefs. Also if user already has an 591 // default values under RegisterUserPrefs. Also if user already has an
592 // existing profile we do not want to override those preferences so we only 592 // existing profile we do not want to override those preferences so we only
593 // set new values if they have not been set already. This method gets called 593 // set new values if they have not been set already. This method gets called
594 // during First Run. 594 // during First Run.
595 static void SetNewHomePagePrefs(PrefService* prefs); 595 static void SetNewHomePagePrefs(PrefService* prefs);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 virtual bool CanDuplicateContentsAt(int index); 697 virtual bool CanDuplicateContentsAt(int index);
698 virtual void DuplicateContentsAt(int index); 698 virtual void DuplicateContentsAt(int index);
699 virtual void CloseFrameAfterDragSession(); 699 virtual void CloseFrameAfterDragSession();
700 virtual void CreateHistoricalTab(TabContentsWrapper* contents); 700 virtual void CreateHistoricalTab(TabContentsWrapper* contents);
701 virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents); 701 virtual bool RunUnloadListenerBeforeClosing(TabContentsWrapper* contents);
702 virtual bool CanCloseContents(std::vector<int>* indices); 702 virtual bool CanCloseContents(std::vector<int>* indices);
703 virtual bool CanBookmarkAllTabs() const; 703 virtual bool CanBookmarkAllTabs() const;
704 virtual void BookmarkAllTabs(); 704 virtual void BookmarkAllTabs();
705 virtual bool CanCloseTab() const; 705 virtual bool CanCloseTab() const;
706 virtual void ToggleUseVerticalTabs(); 706 virtual void ToggleUseVerticalTabs();
707 virtual void ToggleUseCompactNavigationBar();
707 virtual bool CanRestoreTab(); 708 virtual bool CanRestoreTab();
708 virtual void RestoreTab(); 709 virtual void RestoreTab();
709 virtual bool LargeIconsPermitted() const; 710 virtual bool LargeIconsPermitted() const;
710 711
711 // Overridden from TabStripModelObserver: 712 // Overridden from TabStripModelObserver:
712 virtual void TabInsertedAt(TabContentsWrapper* contents, 713 virtual void TabInsertedAt(TabContentsWrapper* contents,
713 int index, 714 int index,
714 bool foreground); 715 bool foreground);
715 virtual void TabClosingAt(TabStripModel* tab_strip_model, 716 virtual void TabClosingAt(TabStripModel* tab_strip_model,
716 TabContentsWrapper* contents, 717 TabContentsWrapper* contents,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition); 1023 TabContents* GetOrCloneTabForDisposition(WindowOpenDisposition disposition);
1023 1024
1024 // Sets the insertion policy of the tabstrip based on whether vertical tabs 1025 // Sets the insertion policy of the tabstrip based on whether vertical tabs
1025 // are enabled. 1026 // are enabled.
1026 void UpdateTabStripModelInsertionPolicy(); 1027 void UpdateTabStripModelInsertionPolicy();
1027 1028
1028 // Invoked when the use vertical tabs preference changes. Resets the insertion 1029 // Invoked when the use vertical tabs preference changes. Resets the insertion
1029 // policy of the tab strip model and notifies the window. 1030 // policy of the tab strip model and notifies the window.
1030 void UseVerticalTabsChanged(); 1031 void UseVerticalTabsChanged();
1031 1032
1033 // Invoked when the use of the compact navigation bar preference changes.
1034 // Notifies the window.
1035 void UseCompactNavigationBarChanged();
1036
1032 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If 1037 // Implementation of SupportsWindowFeature and CanSupportWindowFeature. If
1033 // |check_fullscreen| is true, the set of features reflect the actual state of 1038 // |check_fullscreen| is true, the set of features reflect the actual state of
1034 // the browser, otherwise the set of features reflect the possible state of 1039 // the browser, otherwise the set of features reflect the possible state of
1035 // the browser. 1040 // the browser.
1036 bool SupportsWindowFeatureImpl(WindowFeature feature, 1041 bool SupportsWindowFeatureImpl(WindowFeature feature,
1037 bool check_fullscreen) const; 1042 bool check_fullscreen) const;
1038 1043
1039 // Determines if closing of browser can really be permitted after normal 1044 // Determines if closing of browser can really be permitted after normal
1040 // sequence of downloads and unload handlers have given the go-ahead to close. 1045 // sequence of downloads and unload handlers have given the go-ahead to close.
1041 // It is called from ShouldCloseWindow. It checks with 1046 // It is called from ShouldCloseWindow. It checks with
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 UPDATE_SHORTCUT // Update icon for app shortcut. 1190 UPDATE_SHORTCUT // Update icon for app shortcut.
1186 }; 1191 };
1187 1192
1188 // Which deferred action to perform when OnDidGetApplicationInfo is notified 1193 // Which deferred action to perform when OnDidGetApplicationInfo is notified
1189 // from a TabContents. Currently, only one pending action is allowed. 1194 // from a TabContents. Currently, only one pending action is allowed.
1190 WebAppAction pending_web_app_action_; 1195 WebAppAction pending_web_app_action_;
1191 1196
1192 // Tracks the display mode of the tabstrip. 1197 // Tracks the display mode of the tabstrip.
1193 mutable BooleanPrefMember use_vertical_tabs_; 1198 mutable BooleanPrefMember use_vertical_tabs_;
1194 1199
1200 // Tracks the display mode of the navigation bar.
1201 mutable BooleanPrefMember use_compact_navigation_bar_;
1202
1195 // The profile's tab restore service. The service is owned by the profile, 1203 // The profile's tab restore service. The service is owned by the profile,
1196 // and we install ourselves as an observer. 1204 // and we install ourselves as an observer.
1197 TabRestoreService* tab_restore_service_; 1205 TabRestoreService* tab_restore_service_;
1198 1206
1199 // Helper which implements the TabRestoreServiceDelegate interface. 1207 // Helper which implements the TabRestoreServiceDelegate interface.
1200 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_; 1208 scoped_ptr<BrowserTabRestoreServiceDelegate> tab_restore_service_delegate_;
1201 1209
1202 scoped_ptr<InstantController> instant_; 1210 scoped_ptr<InstantController> instant_;
1203 scoped_ptr<InstantUnloadHandler> instant_unload_handler_; 1211 scoped_ptr<InstantUnloadHandler> instant_unload_handler_;
1204 1212
1205 DISALLOW_COPY_AND_ASSIGN(Browser); 1213 DISALLOW_COPY_AND_ASSIGN(Browser);
1206 }; 1214 };
1207 1215
1208 #endif // CHROME_BROWSER_UI_BROWSER_H_ 1216 #endif // CHROME_BROWSER_UI_BROWSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_unittest.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698