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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.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 | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 shelf->alignment()); 979 shelf->alignment());
980 } 980 }
981 981
982 void ChromeLauncherController::OnShelfAutoHideBehaviorChanged( 982 void ChromeLauncherController::OnShelfAutoHideBehaviorChanged(
983 ash::Shelf* shelf) { 983 ash::Shelf* shelf) {
984 ash::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), 984 ash::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(),
985 GetDisplayIDForShelf(shelf), 985 GetDisplayIDForShelf(shelf),
986 shelf->auto_hide_behavior()); 986 shelf->auto_hide_behavior());
987 } 987 }
988 988
989 void ChromeLauncherController::OnShelfAutoHideStateChanged(ash::Shelf* shelf) {}
990
991 void ChromeLauncherController::OnShelfVisibilityStateChanged(
992 ash::Shelf* shelf) {}
993
989 void ChromeLauncherController::ShelfItemAdded(int index) { 994 void ChromeLauncherController::ShelfItemAdded(int index) {
990 // The app list launcher can get added to the shelf after we applied the 995 // The app list launcher can get added to the shelf after we applied the
991 // preferences. In that case the item might be at the wrong spot. As such we 996 // preferences. In that case the item might be at the wrong spot. As such we
992 // call the function again. 997 // call the function again.
993 if (model_->items()[index].type == ash::TYPE_APP_LIST) 998 if (model_->items()[index].type == ash::TYPE_APP_LIST)
994 UpdateAppLaunchersFromPref(); 999 UpdateAppLaunchersFromPref();
995 } 1000 }
996 1001
997 void ChromeLauncherController::ShelfItemRemoved(int index, ash::ShelfID id) { 1002 void ChromeLauncherController::ShelfItemRemoved(int index, ash::ShelfID id) {
998 // TODO(skuhne): This fixes crbug.com/429870, but it does not answer why we 1003 // TODO(skuhne): This fixes crbug.com/429870, but it does not answer why we
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 1906
1902 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( 1907 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp(
1903 const std::string& app_id) { 1908 const std::string& app_id) {
1904 for (const auto& app_icon_loader : app_icon_loaders_) { 1909 for (const auto& app_icon_loader : app_icon_loaders_) {
1905 if (app_icon_loader->CanLoadImageForApp(app_id)) 1910 if (app_icon_loader->CanLoadImageForApp(app_id))
1906 return app_icon_loader.get(); 1911 return app_icon_loader.get();
1907 } 1912 }
1908 1913
1909 return nullptr; 1914 return nullptr;
1910 } 1915 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698