| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 virtual bool CanCloseContents(std::vector<int>* indices) { | 123 virtual bool CanCloseContents(std::vector<int>* indices) { |
| 124 if (!can_close_) | 124 if (!can_close_) |
| 125 indices->clear(); | 125 indices->clear(); |
| 126 return can_close_; | 126 return can_close_; |
| 127 } | 127 } |
| 128 virtual bool CanBookmarkAllTabs() const { return false; } | 128 virtual bool CanBookmarkAllTabs() const { return false; } |
| 129 virtual void BookmarkAllTabs() {} | 129 virtual void BookmarkAllTabs() {} |
| 130 virtual bool CanCloseTab() const { return true; } | 130 virtual bool CanCloseTab() const { return true; } |
| 131 virtual bool UseVerticalTabs() const { return false; } | 131 virtual bool UseVerticalTabs() const { return false; } |
| 132 virtual void ToggleUseVerticalTabs() {} | 132 virtual void ToggleUseVerticalTabs() {} |
| 133 virtual bool UseCompactNavigationBar() const { return false; } |
| 134 virtual void ToggleUseCompactNavigationBar() {} |
| 133 virtual bool LargeIconsPermitted() const { return true; } | 135 virtual bool LargeIconsPermitted() const { return true; } |
| 134 | 136 |
| 135 private: | 137 private: |
| 136 // A dummy TabContents we give to callers that expect us to actually build a | 138 // A dummy TabContents we give to callers that expect us to actually build a |
| 137 // Destinations tab for them. | 139 // Destinations tab for them. |
| 138 TabContentsWrapper* dummy_contents_; | 140 TabContentsWrapper* dummy_contents_; |
| 139 | 141 |
| 140 // Whether tabs can be closed. | 142 // Whether tabs can be closed. |
| 141 bool can_close_; | 143 bool can_close_; |
| 142 | 144 |
| (...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2199 strip.ActivateTabAt(1, true); | 2201 strip.ActivateTabAt(1, true); |
| 2200 ASSERT_EQ(1, observer.GetStateCount()); | 2202 ASSERT_EQ(1, observer.GetStateCount()); |
| 2201 MockTabStripModelObserver::State s( | 2203 MockTabStripModelObserver::State s( |
| 2202 contents2, 1, MockTabStripModelObserver::SELECT); | 2204 contents2, 1, MockTabStripModelObserver::SELECT); |
| 2203 s.src_contents = contents2; | 2205 s.src_contents = contents2; |
| 2204 s.user_gesture = true; | 2206 s.user_gesture = true; |
| 2205 EXPECT_TRUE(observer.StateEquals(0, s)); | 2207 EXPECT_TRUE(observer.StateEquals(0, s)); |
| 2206 strip.RemoveObserver(&observer); | 2208 strip.RemoveObserver(&observer); |
| 2207 strip.CloseAllTabs(); | 2209 strip.CloseAllTabs(); |
| 2208 } | 2210 } |
| OLD | NEW |