| 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_TABSTRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/navigation_controller.h" | 8 #include "content/public/browser/navigation_controller.h" |
| 9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "content/public/common/page_transition_types.h" | 10 #include "content/public/common/page_transition_types.h" |
| 11 #include "ui/base/window_open_disposition.h" | 11 #include "ui/base/window_open_disposition.h" |
| 12 | 12 |
| 13 class Browser; | 13 class Browser; |
| 14 class GURL; | 14 class GURL; |
| 15 class Profile; | 15 class Profile; |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 class SiteInstance; | 18 class SiteInstance; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Rect; | 22 class Rect; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace chrome { | 25 namespace chrome { |
| 26 | 26 |
| 27 // Adds a tab to the tab strip of the specified browser and loads |url| into it. |
| 28 // If |url| is an empty URL, then the new tab-page is laoded. An |index| of -1 |
| 29 // means to append it to the end of the tab strip. |
| 30 void AddURLTabAt(Browser* browser, const GURL& url, int index, bool foreground); |
| 31 |
| 27 // Adds a blank tab to the tab strip of the specified browser; an |index| of -1 | 32 // Adds a blank tab to the tab strip of the specified browser; an |index| of -1 |
| 28 // means to append it to the end of the tab strip. | 33 // means to append it to the end of the tab strip. |
| 29 void AddBlankTabAt(Browser* browser, int index, bool foreground); | 34 void AddBlankTabAt(Browser* browser, int index, bool foreground); |
| 30 | 35 |
| 31 // Adds a selected tab with the specified URL and transition, returns the | 36 // Adds a selected tab with the specified URL and transition, returns the |
| 32 // created WebContents. | 37 // created WebContents. |
| 33 content::WebContents* AddSelectedTabWithURL(Browser* browser, | 38 content::WebContents* AddSelectedTabWithURL(Browser* browser, |
| 34 const GURL& url, | 39 const GURL& url, |
| 35 content::PageTransition transition); | 40 content::PageTransition transition); |
| 36 | 41 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 49 | 54 |
| 50 // Closes the specified WebContents in the specified Browser. If | 55 // Closes the specified WebContents in the specified Browser. If |
| 51 // |add_to_history| is true, an entry in the historical tab database is created. | 56 // |add_to_history| is true, an entry in the historical tab database is created. |
| 52 void CloseWebContents(Browser* browser, | 57 void CloseWebContents(Browser* browser, |
| 53 content::WebContents* contents, | 58 content::WebContents* contents, |
| 54 bool add_to_history); | 59 bool add_to_history); |
| 55 | 60 |
| 56 } // namespace chrome | 61 } // namespace chrome |
| 57 | 62 |
| 58 #endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ | 63 #endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_ |
| OLD | NEW |