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 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 5 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 void GoBack(WebContents* contents) { | 147 void GoBack(WebContents* contents) { |
148 controller().GoBack(); | 148 controller().GoBack(); |
149 } | 149 } |
150 | 150 |
151 void GoForward(WebContents* contents) { | 151 void GoForward(WebContents* contents) { |
152 controller().GoForward(); | 152 controller().GoForward(); |
153 } | 153 } |
154 | 154 |
155 void SwitchTabTo(WebContents* contents) { | 155 void SwitchTabTo(WebContents* contents) { |
156 // contents()->WasRestored(); | 156 // contents()->WasShown(); |
157 } | 157 } |
158 | 158 |
159 // Sets the id of the specified contents. | 159 // Sets the id of the specified contents. |
160 void SetID(WebContents* contents, int id) { | 160 void SetID(WebContents* contents, int id) { |
161 GetIDAccessor()->SetProperty(contents->GetPropertyBag(), id); | 161 GetIDAccessor()->SetProperty(contents->GetPropertyBag(), id); |
162 } | 162 } |
163 | 163 |
164 // Returns the id of the specified contents. | 164 // Returns the id of the specified contents. |
165 int GetID(WebContents* contents) { | 165 int GetID(WebContents* contents) { |
166 return *GetIDAccessor()->GetProperty(contents->GetPropertyBag()); | 166 return *GetIDAccessor()->GetProperty(contents->GetPropertyBag()); |
(...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2413 ASSERT_EQ(1, observer.GetStateCount()); | 2413 ASSERT_EQ(1, observer.GetStateCount()); |
2414 MockTabStripModelObserver::State s( | 2414 MockTabStripModelObserver::State s( |
2415 contents2, 1, MockTabStripModelObserver::SELECT); | 2415 contents2, 1, MockTabStripModelObserver::SELECT); |
2416 s.src_contents = contents2; | 2416 s.src_contents = contents2; |
2417 s.src_index = 1; | 2417 s.src_index = 1; |
2418 s.user_gesture = false; | 2418 s.user_gesture = false; |
2419 EXPECT_TRUE(observer.StateEquals(0, s)); | 2419 EXPECT_TRUE(observer.StateEquals(0, s)); |
2420 strip.RemoveObserver(&observer); | 2420 strip.RemoveObserver(&observer); |
2421 strip.CloseAllTabs(); | 2421 strip.CloseAllTabs(); |
2422 } | 2422 } |
OLD | NEW |