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 "chrome/browser/dom_ui/new_tab_ui.h" | 7 #include "chrome/browser/dom_ui/new_tab_ui.h" |
8 #include "chrome/browser/navigation_controller.h" | 8 #include "chrome/browser/navigation_controller.h" |
9 #include "chrome/browser/navigation_entry.h" | 9 #include "chrome/browser/navigation_entry.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 Profile* profile, | 1002 Profile* profile, |
1003 PageTransition::Type transition, | 1003 PageTransition::Type transition, |
1004 bool defer_load, | 1004 bool defer_load, |
1005 SiteInstance* instance) const { | 1005 SiteInstance* instance) const { |
1006 if (url == NewTabUIURL()) | 1006 if (url == NewTabUIURL()) |
1007 return dummy_contents_; | 1007 return dummy_contents_; |
1008 return NULL; | 1008 return NULL; |
1009 } | 1009 } |
1010 virtual bool CanDuplicateContentsAt(int index) { return false; } | 1010 virtual bool CanDuplicateContentsAt(int index) { return false; } |
1011 virtual void DuplicateContentsAt(int index) {} | 1011 virtual void DuplicateContentsAt(int index) {} |
1012 virtual void ValidateLoadingAnimations() {} | |
1013 virtual void CloseFrameAfterDragSession() {} | 1012 virtual void CloseFrameAfterDragSession() {} |
1014 | 1013 |
1015 private: | 1014 private: |
1016 // A dummy TabContents we give to callers that expect us to actually build a | 1015 // A dummy TabContents we give to callers that expect us to actually build a |
1017 // Destinations tab for them. | 1016 // Destinations tab for them. |
1018 TabContents* dummy_contents_; | 1017 TabContents* dummy_contents_; |
1019 | 1018 |
1020 DISALLOW_EVIL_CONSTRUCTORS(TabStripDummyDelegate); | 1019 DISALLOW_EVIL_CONSTRUCTORS(TabStripDummyDelegate); |
1021 }; | 1020 }; |
1022 | 1021 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 | 1166 |
1168 // Close the Tab. The next-adjacent should be selected. | 1167 // Close the Tab. The next-adjacent should be selected. |
1169 strip.CloseTabContentsAt(4); | 1168 strip.CloseTabContentsAt(4); |
1170 | 1169 |
1171 EXPECT_EQ(3, strip.selected_index()); | 1170 EXPECT_EQ(3, strip.selected_index()); |
1172 | 1171 |
1173 // Clean up. | 1172 // Clean up. |
1174 strip.CloseAllTabs(); | 1173 strip.CloseAllTabs(); |
1175 } | 1174 } |
1176 | 1175 |
OLD | NEW |