Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: ash/shelf/shelf_widget_unittest.cc

Issue 2007003002: mash: Preliminary support for shelf auto-hide (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shutdown
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shell/shelf_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/shelf/shelf_widget.h" 5 #include "ash/shelf/shelf_widget.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_delegate.h" 9 #include "ash/shelf/shelf_delegate.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 ~TestShelfDelegate() override {} 334 ~TestShelfDelegate() override {}
335 335
336 // ShelfDelegate implementation. 336 // ShelfDelegate implementation.
337 void OnShelfCreated(Shelf* shelf) override { 337 void OnShelfCreated(Shelf* shelf) override {
338 shelf->SetAlignment(initial_alignment_); 338 shelf->SetAlignment(initial_alignment_);
339 shelf->SetAutoHideBehavior(initial_auto_hide_behavior_); 339 shelf->SetAutoHideBehavior(initial_auto_hide_behavior_);
340 } 340 }
341 void OnShelfDestroyed(Shelf* shelf) override {} 341 void OnShelfDestroyed(Shelf* shelf) override {}
342 void OnShelfAlignmentChanged(Shelf* shelf) override {} 342 void OnShelfAlignmentChanged(Shelf* shelf) override {}
343 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {} 343 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {}
344 void OnShelfAutoHideStateChanged(Shelf* shelf) override {}
345 void OnShelfVisibilityStateChanged(Shelf* shelf) override {}
344 ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; } 346 ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; }
345 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; } 347 bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; }
346 const std::string& GetAppIDForShelfID(ShelfID id) override { 348 const std::string& GetAppIDForShelfID(ShelfID id) override {
347 return base::EmptyString(); 349 return base::EmptyString();
348 } 350 }
349 void PinAppWithID(const std::string& app_id) override {} 351 void PinAppWithID(const std::string& app_id) override {}
350 bool IsAppPinned(const std::string& app_id) override { return false; } 352 bool IsAppPinned(const std::string& app_id) override { return false; }
351 void UnpinAppWithID(const std::string& app_id) override {} 353 void UnpinAppWithID(const std::string& app_id) override {}
352 354
353 private: 355 private:
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 456 }
455 457
456 TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) { 458 TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) {
457 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior. 459 // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
458 TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_BOTTOM_LOCKED, 460 TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_BOTTOM_LOCKED,
459 SHELF_AUTO_HIDE_BEHAVIOR_NEVER, 461 SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
460 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN); 462 SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
461 } 463 }
462 464
463 } // namespace ash 465 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shell/shelf_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698