| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 public: | 235 public: |
| 236 ShelfLayoutObserverTest() | 236 ShelfLayoutObserverTest() |
| 237 : changed_auto_hide_state_(false) { | 237 : changed_auto_hide_state_(false) { |
| 238 } | 238 } |
| 239 | 239 |
| 240 ~ShelfLayoutObserverTest() override {} | 240 ~ShelfLayoutObserverTest() override {} |
| 241 | 241 |
| 242 bool changed_auto_hide_state() const { return changed_auto_hide_state_; } | 242 bool changed_auto_hide_state() const { return changed_auto_hide_state_; } |
| 243 | 243 |
| 244 private: | 244 private: |
| 245 // ShelfLayoutManagerObserver: |
| 245 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override { | 246 void OnAutoHideStateChanged(ShelfAutoHideState new_state) override { |
| 246 changed_auto_hide_state_ = true; | 247 changed_auto_hide_state_ = true; |
| 247 } | 248 } |
| 248 | 249 |
| 249 bool changed_auto_hide_state_; | 250 bool changed_auto_hide_state_; |
| 250 | 251 |
| 251 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest); | 252 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest); |
| 252 }; | 253 }; |
| 253 | 254 |
| 254 // Trivial item implementation that tracks its views for testing. | 255 // Trivial item implementation that tracks its views for testing. |
| (...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2293 StatusAreaWidget* status_area_widget = | 2294 StatusAreaWidget* status_area_widget = |
| 2294 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); | 2295 Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); |
| 2295 EXPECT_TRUE(status_area_widget->IsVisible()); | 2296 EXPECT_TRUE(status_area_widget->IsVisible()); |
| 2296 // Shelf should be in the first display's area. | 2297 // Shelf should be in the first display's area. |
| 2297 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); | 2298 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); |
| 2298 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); | 2299 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); |
| 2299 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); | 2300 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); |
| 2300 } | 2301 } |
| 2301 | 2302 |
| 2302 } // namespace ash | 2303 } // namespace ash |
| OLD | NEW |