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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 1877543002: Revise the shelf alignment locking mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update and cleanup tests. Created 4 years, 8 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
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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 shelf->SetAutoHideBehavior(ash::GetShelfAutoHideBehaviorPref(prefs, display)); 1022 shelf->SetAutoHideBehavior(ash::GetShelfAutoHideBehaviorPref(prefs, display));
1023 1023
1024 if (ash::ShelfWidget::ShelfAlignmentAllowed()) 1024 if (ash::ShelfWidget::ShelfAlignmentAllowed())
1025 shelf->SetAlignment(ash::GetShelfAlignmentPref(prefs, display)); 1025 shelf->SetAlignment(ash::GetShelfAlignmentPref(prefs, display));
1026 } 1026 }
1027 1027
1028 void ChromeLauncherController::OnShelfDestroyed(ash::Shelf* shelf) {} 1028 void ChromeLauncherController::OnShelfDestroyed(ash::Shelf* shelf) {}
1029 1029
1030 void ChromeLauncherController::OnShelfAlignmentChanged(ash::Shelf* shelf) { 1030 void ChromeLauncherController::OnShelfAlignmentChanged(ash::Shelf* shelf) {
1031 ash::SetShelfAlignmentPref(profile_->GetPrefs(), GetDisplayIDForShelf(shelf), 1031 ash::SetShelfAlignmentPref(profile_->GetPrefs(), GetDisplayIDForShelf(shelf),
1032 shelf->GetAlignment()); 1032 shelf->alignment());
1033 } 1033 }
1034 1034
1035 void ChromeLauncherController::OnShelfAutoHideBehaviorChanged( 1035 void ChromeLauncherController::OnShelfAutoHideBehaviorChanged(
1036 ash::Shelf* shelf) { 1036 ash::Shelf* shelf) {
1037 ash::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), 1037 ash::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(),
1038 GetDisplayIDForShelf(shelf), 1038 GetDisplayIDForShelf(shelf),
1039 shelf->auto_hide_behavior()); 1039 shelf->auto_hide_behavior());
1040 } 1040 }
1041 1041
1042 void ChromeLauncherController::ShelfItemAdded(int index) { 1042 void ChromeLauncherController::ShelfItemAdded(int index) {
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 2063
2064 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( 2064 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp(
2065 const std::string& app_id) { 2065 const std::string& app_id) {
2066 for (const auto& app_icon_loader : app_icon_loaders_) { 2066 for (const auto& app_icon_loader : app_icon_loaders_) {
2067 if (app_icon_loader->CanLoadImageForApp(app_id)) 2067 if (app_icon_loader->CanLoadImageForApp(app_id))
2068 return app_icon_loader.get(); 2068 return app_icon_loader.get();
2069 } 2069 }
2070 2070
2071 return nullptr; 2071 return nullptr;
2072 } 2072 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_launcher_prefs.cc ('k') | chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698