OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/common/shelf/shelf_widget.h" | 5 #include "ash/common/shelf/shelf_widget.h" |
6 | 6 |
7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
8 #include "ash/common/shelf/shelf_delegate.h" | 8 #include "ash/common/shelf/shelf_delegate.h" |
9 #include "ash/common/shelf/shelf_layout_manager.h" | 9 #include "ash/common/shelf/shelf_layout_manager.h" |
10 #include "ash/common/shelf/shelf_view.h" | 10 #include "ash/common/shelf/shelf_view.h" |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // OnShelfCreated, to simulate ChromeLauncherController's behavior. | 352 // OnShelfCreated, to simulate ChromeLauncherController's behavior. |
353 class TestShelfDelegate : public ShelfDelegate { | 353 class TestShelfDelegate : public ShelfDelegate { |
354 public: | 354 public: |
355 TestShelfDelegate(ShelfAlignment initial_alignment, | 355 TestShelfDelegate(ShelfAlignment initial_alignment, |
356 ShelfAutoHideBehavior initial_auto_hide_behavior) | 356 ShelfAutoHideBehavior initial_auto_hide_behavior) |
357 : initial_alignment_(initial_alignment), | 357 : initial_alignment_(initial_alignment), |
358 initial_auto_hide_behavior_(initial_auto_hide_behavior) {} | 358 initial_auto_hide_behavior_(initial_auto_hide_behavior) {} |
359 ~TestShelfDelegate() override {} | 359 ~TestShelfDelegate() override {} |
360 | 360 |
361 // ShelfDelegate implementation. | 361 // ShelfDelegate implementation. |
362 void OnShelfCreated(Shelf* shelf) override { | 362 void OnShelfCreated(WmShelf* shelf) override { |
363 shelf->wm_shelf()->SetAlignment(initial_alignment_); | 363 shelf->SetAlignment(initial_alignment_); |
364 shelf->wm_shelf()->SetAutoHideBehavior(initial_auto_hide_behavior_); | 364 shelf->SetAutoHideBehavior(initial_auto_hide_behavior_); |
365 } | 365 } |
366 void OnShelfDestroyed(Shelf* shelf) override {} | 366 void OnShelfDestroyed(WmShelf* shelf) override {} |
367 void OnShelfAlignmentChanged(Shelf* shelf) override {} | 367 void OnShelfAlignmentChanged(WmShelf* shelf) override {} |
368 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {} | 368 void OnShelfAutoHideBehaviorChanged(WmShelf* shelf) override {} |
369 void OnShelfAutoHideStateChanged(Shelf* shelf) override {} | 369 void OnShelfAutoHideStateChanged(WmShelf* shelf) override {} |
370 void OnShelfVisibilityStateChanged(Shelf* shelf) override {} | 370 void OnShelfVisibilityStateChanged(WmShelf* shelf) override {} |
371 ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; } | 371 ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; } |
372 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; } | 372 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; } |
373 const std::string& GetAppIDForShelfID(ShelfID id) override { | 373 const std::string& GetAppIDForShelfID(ShelfID id) override { |
374 return base::EmptyString(); | 374 return base::EmptyString(); |
375 } | 375 } |
376 void PinAppWithID(const std::string& app_id) override {} | 376 void PinAppWithID(const std::string& app_id) override {} |
377 bool IsAppPinned(const std::string& app_id) override { return false; } | 377 bool IsAppPinned(const std::string& app_id) override { return false; } |
378 void UnpinAppWithID(const std::string& app_id) override {} | 378 void UnpinAppWithID(const std::string& app_id) override {} |
379 | 379 |
380 private: | 380 private: |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 } | 487 } |
488 | 488 |
489 TEST_P(ShelfWidgetTestWithDelegate, CreateLockedShelf) { | 489 TEST_P(ShelfWidgetTestWithDelegate, CreateLockedShelf) { |
490 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. | 490 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. |
491 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED, | 491 TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED, |
492 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, | 492 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, |
493 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); | 493 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); |
494 } | 494 } |
495 | 495 |
496 } // namespace ash | 496 } // namespace ash |
OLD | NEW |