| 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 "ash/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/accelerators/accelerator_table.h" | 8 #include "ash/accelerators/accelerator_table.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // views::WidgetObserver override. | 109 // views::WidgetObserver override. |
| 110 void OnWidgetBoundsChanged(views::Widget* widget, | 110 void OnWidgetBoundsChanged(views::Widget* widget, |
| 111 const gfx::Rect& new_bounds) override { | 111 const gfx::Rect& new_bounds) override { |
| 112 if (done_waiting_) | 112 if (done_waiting_) |
| 113 return; | 113 return; |
| 114 | 114 |
| 115 ++animation_steps_; | 115 ++animation_steps_; |
| 116 if (IsDoneAnimating()) { | 116 if (IsDoneAnimating()) { |
| 117 done_waiting_ = true; | 117 done_waiting_ = true; |
| 118 base::MessageLoop::current()->Quit(); | 118 base::MessageLoop::current()->QuitWhenIdle(); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 gfx::Rect target_bounds_; | 122 gfx::Rect target_bounds_; |
| 123 int animation_steps_; | 123 int animation_steps_; |
| 124 bool done_waiting_; | 124 bool done_waiting_; |
| 125 | 125 |
| 126 DISALLOW_COPY_AND_ASSIGN(ShelfAnimationWaiter); | 126 DISALLOW_COPY_AND_ASSIGN(ShelfAnimationWaiter); |
| 127 }; | 127 }; |
| 128 | 128 |
| (...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2356 StatusAreaWidget* status_area_widget = | 2356 StatusAreaWidget* status_area_widget = |
| 2357 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); | 2357 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); |
| 2358 EXPECT_TRUE(status_area_widget->IsVisible()); | 2358 EXPECT_TRUE(status_area_widget->IsVisible()); |
| 2359 // Shelf should be in the first display's area. | 2359 // Shelf should be in the first display's area. |
| 2360 // TODO: make this test more robust against changes in font, font size. | 2360 // TODO: make this test more robust against changes in font, font size. |
| 2361 EXPECT_EQ("353,453 147x47", | 2361 EXPECT_EQ("353,453 147x47", |
| 2362 status_area_widget->GetWindowBoundsInScreen().ToString()); | 2362 status_area_widget->GetWindowBoundsInScreen().ToString()); |
| 2363 } | 2363 } |
| 2364 | 2364 |
| 2365 } // namespace ash | 2365 } // namespace ash |
| OLD | NEW |