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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model_delegate.h

Issue 11392004: Remove TabContents from AddBlankTabAt, kill AddBlankTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
(...skipping 28 matching lines...) Expand all
39 /////////////////////////////////////////////////////////////////////////////// 39 ///////////////////////////////////////////////////////////////////////////////
40 class TabStripModelDelegate { 40 class TabStripModelDelegate {
41 public: 41 public:
42 enum { 42 enum {
43 TAB_MOVE_ACTION = 1, 43 TAB_MOVE_ACTION = 1,
44 TAB_TEAROFF_ACTION = 2 44 TAB_TEAROFF_ACTION = 2
45 }; 45 };
46 46
47 virtual ~TabStripModelDelegate() {} 47 virtual ~TabStripModelDelegate() {}
48 48
49 // Adds what the delegate considers to be a blank tab to the model. 49 // Adds what the delegate considers to be a blank tab to the model. An |index|
50 virtual TabContents* AddBlankTab(bool foreground) = 0; 50 // value of -1 means to append the contents to the end of the tab strip.
51 virtual TabContents* AddBlankTabAt(int index, bool foreground) = 0; 51 virtual void AddBlankTabAt(int index, bool foreground) = 0;
52 52
53 // Asks for a new TabStripModel to be created and the given web contentses to 53 // Asks for a new TabStripModel to be created and the given web contentses to
54 // be added to it. Its size and position are reflected in |window_bounds|. 54 // be added to it. Its size and position are reflected in |window_bounds|.
55 // If |dock_info|'s type is other than NONE, the newly created window should 55 // If |dock_info|'s type is other than NONE, the newly created window should
56 // be docked as identified by |dock_info|. Returns the Browser object 56 // be docked as identified by |dock_info|. Returns the Browser object
57 // representing the newly created window and tab strip. This does not 57 // representing the newly created window and tab strip. This does not
58 // show the window; it's up to the caller to do so. 58 // show the window; it's up to the caller to do so.
59 // 59 //
60 // TODO(avi): This is a layering violation; the TabStripModel should not know 60 // TODO(avi): This is a layering violation; the TabStripModel should not know
61 // about the Browser type. At least fix so that this returns a 61 // about the Browser type. At least fix so that this returns a
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Returns true if we should allow "bookmark all tabs" in this window; this is 119 // Returns true if we should allow "bookmark all tabs" in this window; this is
120 // true when there is more than one bookmarkable tab open. 120 // true when there is more than one bookmarkable tab open.
121 virtual bool CanBookmarkAllTabs() const = 0; 121 virtual bool CanBookmarkAllTabs() const = 0;
122 122
123 // Creates a bookmark folder containing a bookmark for all open tabs. 123 // Creates a bookmark folder containing a bookmark for all open tabs.
124 virtual void BookmarkAllTabs() = 0; 124 virtual void BookmarkAllTabs() = 0;
125 }; 125 };
126 126
127 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ 127 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.h ('k') | chrome/browser/ui/tabs/test_tab_strip_model_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698