OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util-inl.h" |
8 #include "chrome/browser/dom_ui/new_tab_ui.h" | 8 #include "chrome/browser/dom_ui/new_tab_ui.h" |
9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
10 #include "chrome/browser/profile_manager.h" | 10 #include "chrome/browser/profile_manager.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Overridden from TabStripModelDelegate: | 29 // Overridden from TabStripModelDelegate: |
30 virtual TabContents* AddBlankTab(bool foreground) { return NULL; } | 30 virtual TabContents* AddBlankTab(bool foreground) { return NULL; } |
31 virtual TabContents* AddBlankTabAt(int index, bool foreground) { | 31 virtual TabContents* AddBlankTabAt(int index, bool foreground) { |
32 return NULL; | 32 return NULL; |
33 } | 33 } |
34 virtual Browser* CreateNewStripWithContents(TabContents* contents, | 34 virtual Browser* CreateNewStripWithContents(TabContents* contents, |
35 const gfx::Rect& window_bounds, | 35 const gfx::Rect& window_bounds, |
36 const DockInfo& dock_info) { | 36 const DockInfo& dock_info) { |
37 return NULL; | 37 return NULL; |
38 } | 38 } |
| 39 virtual void ContinueDraggingDetachedTab(TabContents* contents, |
| 40 const gfx::Rect& window_bounds, |
| 41 const gfx::Rect& tab_bounds) { |
| 42 } |
39 virtual int GetDragActions() const { return 0; } | 43 virtual int GetDragActions() const { return 0; } |
40 virtual TabContents* CreateTabContentsForURL( | 44 virtual TabContents* CreateTabContentsForURL( |
41 const GURL& url, | 45 const GURL& url, |
42 const GURL& referrer, | 46 const GURL& referrer, |
43 Profile* profile, | 47 Profile* profile, |
44 PageTransition::Type transition, | 48 PageTransition::Type transition, |
45 bool defer_load, | 49 bool defer_load, |
46 SiteInstance* instance) const { | 50 SiteInstance* instance) const { |
47 if (url == GURL(chrome::kChromeUINewTabURL)) | 51 if (url == GURL(chrome::kChromeUINewTabURL)) |
48 return dummy_contents_; | 52 return dummy_contents_; |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 | 1203 |
1200 // Now select the last tab. | 1204 // Now select the last tab. |
1201 strip.SelectTabContentsAt(strip.count() - 1, true); | 1205 strip.SelectTabContentsAt(strip.count() - 1, true); |
1202 | 1206 |
1203 // Now close the last tab. The next adjacent should be selected. | 1207 // Now close the last tab. The next adjacent should be selected. |
1204 strip.CloseTabContentsAt(strip.count() - 1); | 1208 strip.CloseTabContentsAt(strip.count() - 1); |
1205 EXPECT_EQ(page_d_contents, strip.GetTabContentsAt(strip.selected_index())); | 1209 EXPECT_EQ(page_d_contents, strip.GetTabContentsAt(strip.selected_index())); |
1206 | 1210 |
1207 strip.CloseAllTabs(); | 1211 strip.CloseAllTabs(); |
1208 } | 1212 } |
OLD | NEW |