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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
6 #define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
8 #include "content/public/browser/navigation_controller.h"
9 #include "content/public/browser/web_contents.h"
10 #include "ui/base/page_transition_types.h"
11 #include "ui/base/window_open_disposition.h"
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 AddTabAt(Browser
* browser
, const GURL
& url
, int index
, bool foreground
);
32 // Adds a selected tab with the specified URL and transition, returns the
33 // created WebContents.
34 content::WebContents
* AddSelectedTabWithURL(Browser
* browser
,
36 ui::PageTransition transition
);
38 // Creates a new tab with the already-created WebContents 'new_contents'.
39 // The window for the added contents will be reparented correctly when this
40 // method returns. If |disposition| is NEW_POPUP, |initial_rect| should hold
41 // the initial position and size. If |was_blocked| is non-NULL, then
42 // |*was_blocked| will be set to true if the popup gets blocked, and left
43 // unchanged otherwise.
44 void AddWebContents(Browser
* browser
,
45 content::WebContents
* source_contents
,
46 content::WebContents
* new_contents
,
47 WindowOpenDisposition disposition
,
48 const gfx::Rect
& initial_rect
,
52 // Closes the specified WebContents in the specified Browser. If
53 // |add_to_history| is true, an entry in the historical tab database is created.
54 void CloseWebContents(Browser
* browser
,
55 content::WebContents
* contents
,
60 #endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_