| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 class Browser; | 12 class Browser; |
| 13 class DockInfo; | 13 class DockInfo; |
| 14 class GURL; |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 class WebContents; | 17 class WebContents; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| 20 class Rect; | 21 class Rect; |
| 21 } | 22 } |
| 22 | 23 |
| 23 /////////////////////////////////////////////////////////////////////////////// | 24 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 16 matching lines...) Expand all Loading... |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 enum RestoreTabType { | 43 enum RestoreTabType { |
| 43 RESTORE_NONE, | 44 RESTORE_NONE, |
| 44 RESTORE_TAB, | 45 RESTORE_TAB, |
| 45 RESTORE_WINDOW | 46 RESTORE_WINDOW |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 virtual ~TabStripModelDelegate() {} | 49 virtual ~TabStripModelDelegate() {} |
| 49 | 50 |
| 50 // Adds what the delegate considers to be a blank tab to the model. An |index| | 51 // Adds a tab to the model and loads |url| in the tab. If |url| is an empty |
| 51 // value of -1 means to append the contents to the end of the tab strip. | 52 // URL, then the new tab-page is loaded instead. An |index| value of -1 |
| 52 virtual void AddBlankTabAt(int index, bool foreground) = 0; | 53 // means to append the contents to the end of the tab strip. |
| 54 virtual void AddURLTabAt(const GURL& url, int index, bool foreground) = 0; |
| 53 | 55 |
| 54 // Asks for a new TabStripModel to be created and the given web contentses to | 56 // Asks for a new TabStripModel to be created and the given web contentses to |
| 55 // be added to it. Its size and position are reflected in |window_bounds|. | 57 // be added to it. Its size and position are reflected in |window_bounds|. |
| 56 // If |dock_info|'s type is other than NONE, the newly created window should | 58 // If |dock_info|'s type is other than NONE, the newly created window should |
| 57 // be docked as identified by |dock_info|. Returns the Browser object | 59 // be docked as identified by |dock_info|. Returns the Browser object |
| 58 // representing the newly created window and tab strip. This does not | 60 // representing the newly created window and tab strip. This does not |
| 59 // show the window; it's up to the caller to do so. | 61 // show the window; it's up to the caller to do so. |
| 60 // | 62 // |
| 61 // TODO(avi): This is a layering violation; the TabStripModel should not know | 63 // TODO(avi): This is a layering violation; the TabStripModel should not know |
| 62 // about the Browser type. At least fix so that this returns a | 64 // about the Browser type. At least fix so that this returns a |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 114 |
| 113 // Returns true if we should allow "bookmark all tabs" in this window; this is | 115 // Returns true if we should allow "bookmark all tabs" in this window; this is |
| 114 // true when there is more than one bookmarkable tab open. | 116 // true when there is more than one bookmarkable tab open. |
| 115 virtual bool CanBookmarkAllTabs() const = 0; | 117 virtual bool CanBookmarkAllTabs() const = 0; |
| 116 | 118 |
| 117 // Creates a bookmark folder containing a bookmark for all open tabs. | 119 // Creates a bookmark folder containing a bookmark for all open tabs. |
| 118 virtual void BookmarkAllTabs() = 0; | 120 virtual void BookmarkAllTabs() = 0; |
| 119 }; | 121 }; |
| 120 | 122 |
| 121 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ | 123 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_DELEGATE_H_ |
| OLD | NEW |