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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model.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, 5 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
OLDNEW
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_TABS_TAB_STRIP_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 // Returns the index of the specified TabContents given its raw 288 // Returns the index of the specified TabContents given its raw
289 // WebContents, or TabStripModel::kNoTab if the WebContents is not in this 289 // WebContents, or TabStripModel::kNoTab if the WebContents is not in this
290 // TabStripModel. Note: This is only needed in rare cases where the 290 // TabStripModel. Note: This is only needed in rare cases where the
291 // TabContents is not already present (such as implementing 291 // TabContents is not already present (such as implementing
292 // WebContentsDelegate methods, which don't know about TabContents). Returns 292 // WebContentsDelegate methods, which don't know about TabContents). Returns
293 // NULL if |contents| is not associated with any TabContents in the 293 // NULL if |contents| is not associated with any TabContents in the
294 // model. 294 // model.
295 int GetIndexOfWebContents(const content::WebContents* contents) const; 295 int GetIndexOfWebContents(const content::WebContents* contents) const;
296 296
297 // Returns the index of the specified NavigationController, or kNoTab if it is
298 // not in this TabStripModel.
299 int GetIndexOfController(
300 const content::NavigationController* controller) const;
301
302 // Notify any observers that the TabContents at the specified index has 297 // Notify any observers that the TabContents at the specified index has
303 // changed in some way. See TabChangeType for details of |change_type|. 298 // changed in some way. See TabChangeType for details of |change_type|.
304 void UpdateTabContentsStateAt( 299 void UpdateTabContentsStateAt(
305 int index, 300 int index,
306 TabStripModelObserver::TabChangeType change_type); 301 TabStripModelObserver::TabChangeType change_type);
307 302
308 // Make sure there is an auto-generated New Tab tab in the TabStripModel. 303 // Make sure there is an auto-generated New Tab tab in the TabStripModel.
309 // If |force_create| is true, the New Tab will be created even if the 304 // If |force_create| is true, the New Tab will be created even if the
310 // preference is set to false (used by startup). 305 // preference is set to false (used by startup).
311 void EnsureNewTabVisible(bool force_create); 306 void EnsureNewTabVisible(bool force_create);
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 698
704 // A scoped container for notification registries. 699 // A scoped container for notification registries.
705 content::NotificationRegistrar registrar_; 700 content::NotificationRegistrar registrar_;
706 701
707 TabStripSelectionModel selection_model_; 702 TabStripSelectionModel selection_model_;
708 703
709 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); 704 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel);
710 }; 705 };
711 706
712 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ 707 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/pinned_tab_service_unittest.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698