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

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

Issue 3734003: Add support for SINGLETON_TAB disposition to BrowserNavigator.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 | « no previous file | chrome/browser/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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BROWSER_H_ 5 #ifndef CHROME_BROWSER_BROWSER_H_
6 #define CHROME_BROWSER_BROWSER_H_ 6 #define CHROME_BROWSER_BROWSER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 // method will not execute the command, and the last blocked command will be 618 // method will not execute the command, and the last blocked command will be
619 // recorded for retrieval. 619 // recorded for retrieval.
620 void SetBlockCommandExecution(bool block); 620 void SetBlockCommandExecution(bool block);
621 621
622 // Gets the last blocked command after calling SetBlockCommandExecution(true). 622 // Gets the last blocked command after calling SetBlockCommandExecution(true).
623 // Returns the command id or -1 if there is no command blocked. The 623 // Returns the command id or -1 if there is no command blocked. The
624 // disposition type of the command will be stored in |*disposition| if it's 624 // disposition type of the command will be stored in |*disposition| if it's
625 // not null. 625 // not null.
626 int GetLastBlockedCommand(WindowOpenDisposition* disposition); 626 int GetLastBlockedCommand(WindowOpenDisposition* disposition);
627 627
628 // Called by browser::Navigate() when a navigation has occurred in a tab in
629 // this Browser. Updates the UI for the start of this navigation.
630 void UpdateUIForNavigationInTab(TabContents* contents,
631 PageTransition::Type transition,
632 bool user_initiated);
633
634 // Called by browser::Navigate() to retrieve the home page if no URL is
635 // specified.
636 virtual GURL GetHomePage() const;
sky 2010/10/12 17:44:19 Does this needs to be virtual?
637
628 // Interface implementations //////////////////////////////////////////////// 638 // Interface implementations ////////////////////////////////////////////////
629 639
630 // Overridden from PageNavigator: 640 // Overridden from PageNavigator:
631 virtual void OpenURL(const GURL& url, const GURL& referrer, 641 virtual void OpenURL(const GURL& url, const GURL& referrer,
632 WindowOpenDisposition disposition, 642 WindowOpenDisposition disposition,
633 PageTransition::Type transition); 643 PageTransition::Type transition);
634 644
635 // Overridden from CommandUpdater::CommandUpdaterDelegate: 645 // Overridden from CommandUpdater::CommandUpdaterDelegate:
636 virtual void ExecuteCommand(int id); 646 virtual void ExecuteCommand(int id);
637 647
638 // Overridden from TabRestoreServiceObserver: 648 // Overridden from TabRestoreServiceObserver:
639 virtual void TabRestoreServiceChanged(TabRestoreService* service); 649 virtual void TabRestoreServiceChanged(TabRestoreService* service);
640 virtual void TabRestoreServiceDestroyed(TabRestoreService* service); 650 virtual void TabRestoreServiceDestroyed(TabRestoreService* service);
641 651
652
642 // Overridden from TabHandlerDelegate: 653 // Overridden from TabHandlerDelegate:
643 virtual Profile* GetProfile() const; 654 virtual Profile* GetProfile() const;
644 virtual Browser* AsBrowser(); 655 virtual Browser* AsBrowser();
645 656
646 // Overridden from TabStripModelDelegate: 657 // Overridden from TabStripModelDelegate:
647 virtual TabContents* AddBlankTab(bool foreground); 658 virtual TabContents* AddBlankTab(bool foreground);
648 virtual TabContents* AddBlankTabAt(int index, bool foreground); 659 virtual TabContents* AddBlankTabAt(int index, bool foreground);
649 virtual Browser* CreateNewStripWithContents(TabContents* detached_contents, 660 virtual Browser* CreateNewStripWithContents(TabContents* detached_contents,
650 const gfx::Rect& window_bounds, 661 const gfx::Rect& window_bounds,
651 const DockInfo& dock_info, 662 const DockInfo& dock_info,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 // pass specific flags to the TabStripModel. |add_types| is only used if 917 // pass specific flags to the TabStripModel. |add_types| is only used if
907 // the disposition is NEW_WINDOW or SUPPRESS_OPEN. 918 // the disposition is NEW_WINDOW or SUPPRESS_OPEN.
908 void OpenURLAtIndex(TabContents* source, 919 void OpenURLAtIndex(TabContents* source,
909 const GURL& url, 920 const GURL& url,
910 const GURL& referrer, 921 const GURL& referrer,
911 WindowOpenDisposition disposition, 922 WindowOpenDisposition disposition,
912 PageTransition::Type transition, 923 PageTransition::Type transition,
913 int index, 924 int index,
914 int add_types); 925 int add_types);
915 926
916 // Returns what the user's home page is, or the new tab page if the home page
917 // has not been set.
918 GURL GetHomePage() const;
919
920 // Shows the Find Bar, optionally selecting the next entry that matches the 927 // Shows the Find Bar, optionally selecting the next entry that matches the
921 // existing search string for that Tab. |forward_direction| controls the 928 // existing search string for that Tab. |forward_direction| controls the
922 // search direction. 929 // search direction.
923 void FindInPage(bool find_next, bool forward_direction); 930 void FindInPage(bool find_next, bool forward_direction);
924 931
925 // Closes the frame. 932 // Closes the frame.
926 // TODO(beng): figure out if we need this now that the frame itself closes 933 // TODO(beng): figure out if we need this now that the frame itself closes
927 // after a return to the message loop. 934 // after a return to the message loop.
928 void CloseFrame(); 935 void CloseFrame();
929 936
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 // The profile's tab restore service. The service is owned by the profile, 1105 // The profile's tab restore service. The service is owned by the profile,
1099 // and we install ourselves as an observer. 1106 // and we install ourselves as an observer.
1100 TabRestoreService* tab_restore_service_; 1107 TabRestoreService* tab_restore_service_;
1101 1108
1102 scoped_ptr<InstantController> instant_; 1109 scoped_ptr<InstantController> instant_;
1103 1110
1104 DISALLOW_COPY_AND_ASSIGN(Browser); 1111 DISALLOW_COPY_AND_ASSIGN(Browser);
1105 }; 1112 };
1106 1113
1107 #endif // CHROME_BROWSER_BROWSER_H_ 1114 #endif // CHROME_BROWSER_BROWSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698