blob: 7556854d28b6ac9d05dc4d2aa1a9cfe59f2b56e4 [file] [log] [blame]
[email protected]52877dbc62012-06-29 22:22:031// 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.
4
5#ifndef CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
6#define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
[email protected]52877dbc62012-06-29 22:22:037
[email protected]d1198fd2012-08-13 22:50:198#include "content/public/browser/navigation_controller.h"
[email protected]54944cde2012-12-09 09:24:599#include "content/public/browser/web_contents.h"
Sylvain Defresnec6ccc77d2014-09-19 10:19:3510#include "ui/base/page_transition_types.h"
[email protected]f47621b2013-01-22 20:50:3311#include "ui/base/window_open_disposition.h"
[email protected]52877dbc62012-06-29 22:22:0312
13class Browser;
14class GURL;
[email protected]52877dbc62012-06-29 22:22:0315
16namespace gfx {
17class Rect;
18}
19
20namespace chrome {
21
[email protected]73765a772013-11-15 23:42:1622// Adds a tab to the tab strip of the specified browser and loads |url| into it.
23// If |url| is an empty URL, then the new tab-page is laoded. An |index| of -1
24// means to append it to the end of the tab strip.
[email protected]00509a32013-11-17 17:45:3725void AddTabAt(Browser* browser, const GURL& url, int index, bool foreground);
[email protected]855370052012-07-10 19:30:3226
[email protected]52877dbc62012-06-29 22:22:0327// Adds a selected tab with the specified URL and transition, returns the
[email protected]371d64a2012-12-14 21:11:3228// created WebContents.
[email protected]5a1a52462012-11-15 03:35:1629content::WebContents* AddSelectedTabWithURL(Browser* browser,
30 const GURL& url,
Sylvain Defresnec6ccc77d2014-09-19 10:19:3531 ui::PageTransition transition);
[email protected]52877dbc62012-06-29 22:22:0332
[email protected]52877dbc62012-06-29 22:22:0333// Creates a new tab with the already-created WebContents 'new_contents'.
34// The window for the added contents will be reparented correctly when this
bokan107a47f2015-02-03 23:23:3935// method returns. If |disposition| is NEW_POPUP, |initial_rect| should hold
Charles Harrisonaeef87492017-09-12 20:39:2536// the initial position and size.
[email protected]52877dbc62012-06-29 22:22:0337void AddWebContents(Browser* browser,
38 content::WebContents* source_contents,
erikchenbee5c9622018-04-27 19:30:2539 std::unique_ptr<content::WebContents> new_contents,
[email protected]52877dbc62012-06-29 22:22:0340 WindowOpenDisposition disposition,
Mustaq Ahmedee456c62018-05-18 20:48:50