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

Unified Diff: chrome/browser/ui/browser_tabstrip.h

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.cc ('k') | chrome/browser/ui/browser_tabstrip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tabstrip.h
===================================================================
--- chrome/browser/ui/browser_tabstrip.h (revision 0)
+++ chrome/browser/ui/browser_tabstrip.h (revision 0)
@@ -0,0 +1,78 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
+#define CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
+#pragma once
+
+#include "content/public/common/page_transition_types.h"
+#include "webkit/glue/window_open_disposition.h"
+
+class Browser;
+class GURL;
+class Profile;
+class TabContents;
+
+namespace content {
+class SessionStorageNamespace;
+class SiteInstance;
+class WebContents;
+}
+
+namespace gfx {
+class Rect;
+}
+
+namespace chrome {
+
+int GetIndexOfTab(const Browser* browser, const content::WebContents* contents);
+
+TabContents* GetActiveTabContents(const Browser* browser);
+content::WebContents* GetActiveWebContents(const Browser* browser);
+
+TabContents* GetTabContentsAt(const Browser* browser, int index);
+content::WebContents* GetWebContentsAt(const Browser* browser, int index);
+
+void ActivateTabAt(Browser* browser, int index, bool user_gesture);
+
+// Used by extensions.
+bool IsTabStripEditable(Browser* browser);
+
+// Adds a selected tab with the specified URL and transition, returns the
+// created TabContents.
+TabContents* AddSelectedTabWithURL(Browser* browser,
+ const GURL& url,
+ content::PageTransition transition);
+
+// Adds |tab_contents| to |browser|'s tabstrip.
+void AddTab(Browser* browser,
+ TabContents* tab_contents,
+ content::PageTransition type);
+
+// Creates a new tab with the already-created WebContents 'new_contents'.
+// The window for the added contents will be reparented correctly when this
+// method returns. If |disposition| is NEW_POPUP, |pos| should hold the
+// initial position.
+void AddWebContents(Browser* browser,
+ content::WebContents* source_contents,
+ content::WebContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture);
+void CloseWebContents(Browser* browser, content::WebContents* contents);
+
+void CloseAllTabs(Browser* browser);
+
+// Centralized method for creating a TabContents, configuring and
+// installing all its supporting objects and observers.
+TabContents* TabContentsFactory(
+ Profile* profile,
+ content::SiteInstance* site_instance,
+ int routing_id,
+ const content::WebContents* base_web_contents,
+ content::SessionStorageNamespace* session_storage_namespace);
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_UI_BROWSER_TABSTRIP_H_
Property changes on: chrome\browser\ui\browser_tabstrip.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.cc ('k') | chrome/browser/ui/browser_tabstrip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698