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/views/ash/tab_scrubber.h" | 5 #include "chrome/browser/ui/views/ash/tab_scrubber.h" |
6 | 6 |
7 #include "ash/display/event_transformation_handler.h" | 7 #include "ash/display/event_transformation_handler.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 | 179 |
180 // TabStripModelObserver overrides. | 180 // TabStripModelObserver overrides. |
181 virtual void TabInsertedAt(content::WebContents* contents, | 181 virtual void TabInsertedAt(content::WebContents* contents, |
182 int index, | 182 int index, |
183 bool foreground) OVERRIDE {} | 183 bool foreground) OVERRIDE {} |
184 virtual void TabClosingAt(TabStripModel* tab_strip_model, | 184 virtual void TabClosingAt(TabStripModel* tab_strip_model, |
185 content::WebContents* contents, | 185 content::WebContents* contents, |
186 int index) OVERRIDE {} | 186 int index) OVERRIDE {} |
187 virtual void TabDetachedAt(content::WebContents* contents, | 187 virtual void TabDetachedAt(content::WebContents* contents, |
188 int index) OVERRIDE {} | 188 int index, |
| 189 bool closing_all) OVERRIDE {} |
189 virtual void TabDeactivated(content::WebContents* contents) OVERRIDE {} | 190 virtual void TabDeactivated(content::WebContents* contents) OVERRIDE {} |
190 virtual void ActiveTabChanged(content::WebContents* old_contents, | 191 virtual void ActiveTabChanged(content::WebContents* old_contents, |
191 content::WebContents* new_contents, | 192 content::WebContents* new_contents, |
192 int index, | 193 int index, |
193 int reason) OVERRIDE { | 194 int reason) OVERRIDE { |
194 activation_order_.push_back(index); | 195 activation_order_.push_back(index); |
195 if (index == target_index_) | 196 if (index == target_index_) |
196 quit_closure_.Run(); | 197 quit_closure_.Run(); |
197 } | 198 } |
198 | 199 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { | 416 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { |
416 AddTabs(browser(), 1); | 417 AddTabs(browser(), 1); |
417 | 418 |
418 SendScrubEvent(browser(), 0); | 419 SendScrubEvent(browser(), 0); |
419 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); | 420 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); |
420 browser()->window()->Close(); | 421 browser()->window()->Close(); |
421 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); | 422 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); |
422 } | 423 } |
423 | 424 |
424 #endif // OS_CHROMEOS | 425 #endif // OS_CHROMEOS |
OLD | NEW |