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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #endif | 45 #endif |
46 command_line->AppendSwitch(switches::kOpenAsh); | 46 command_line->AppendSwitch(switches::kOpenAsh); |
47 } | 47 } |
48 | 48 |
49 virtual void SetUpOnMainThread() OVERRIDE { | 49 virtual void SetUpOnMainThread() OVERRIDE { |
50 TabScrubber::GetInstance()->set_activation_delay(0); | 50 TabScrubber::GetInstance()->set_activation_delay(0); |
51 | 51 |
52 // Disable external monitor scaling of coordinates. | 52 // Disable external monitor scaling of coordinates. |
53 ash::Shell* shell = ash::Shell::GetInstance(); | 53 ash::Shell* shell = ash::Shell::GetInstance(); |
54 shell->event_transformation_handler()->set_transformation_mode( | 54 shell->event_transformation_handler()->set_transformation_mode( |
55 ash::internal::EventTransformationHandler::TRANSFORM_NONE); | 55 ash::EventTransformationHandler::TRANSFORM_NONE); |
56 } | 56 } |
57 | 57 |
58 virtual void CleanUpOnMainThread() OVERRIDE { | 58 virtual void CleanUpOnMainThread() OVERRIDE { |
59 browser()->tab_strip_model()->RemoveObserver(this); | 59 browser()->tab_strip_model()->RemoveObserver(this); |
60 } | 60 } |
61 | 61 |
62 TabStrip* GetTabStrip(Browser* browser) { | 62 TabStrip* GetTabStrip(Browser* browser) { |
63 aura::Window* window = browser->window()->GetNativeWindow(); | 63 aura::Window* window = browser->window()->GetNativeWindow(); |
64 return BrowserView::GetBrowserViewForNativeWindow(window)->tabstrip(); | 64 return BrowserView::GetBrowserViewForNativeWindow(window)->tabstrip(); |
65 } | 65 } |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { | 414 IN_PROC_BROWSER_TEST_F(TabScrubberTest, CloseBrowser) { |
415 AddTabs(browser(), 1); | 415 AddTabs(browser(), 1); |
416 | 416 |
417 SendScrubEvent(browser(), 0); | 417 SendScrubEvent(browser(), 0); |
418 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); | 418 EXPECT_TRUE(TabScrubber::GetInstance()->IsActivationPending()); |
419 browser()->window()->Close(); | 419 browser()->window()->Close(); |
420 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); | 420 EXPECT_FALSE(TabScrubber::GetInstance()->IsActivationPending()); |
421 } | 421 } |
422 | 422 |
423 #endif // defined(OS_CHROMEOS) | 423 #endif // defined(OS_CHROMEOS) |
OLD | NEW |