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

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

Issue 2036353002: mash: Move ash/common/wm/shelf to ash/common/shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_mash_shelf_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h"
6 6
7 #include "chrome/browser/extensions/extension_app_icon_loader.h" 7 #include "chrome/browser/extensions/extension_app_icon_loader.h"
8 #include "chrome/browser/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" 9 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h"
10 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" 10 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 return nullptr; 152 return nullptr;
153 } 153 }
154 154
155 void ChromeMashShelfController::OnAlignmentChanged( 155 void ChromeMashShelfController::OnAlignmentChanged(
156 mash::shelf::mojom::Alignment alignment) { 156 mash::shelf::mojom::Alignment alignment) {
157 ash::SetShelfAlignmentPref( 157 ash::SetShelfAlignmentPref(
158 ProfileManager::GetActiveUserProfile()->GetPrefs(), 158 ProfileManager::GetActiveUserProfile()->GetPrefs(),
159 display::Screen::GetScreen()->GetPrimaryDisplay().id(), 159 display::Screen::GetScreen()->GetPrimaryDisplay().id(),
160 static_cast<ash::wm::ShelfAlignment>(alignment)); 160 static_cast<ash::ShelfAlignment>(alignment));
161 } 161 }
162 162
163 void ChromeMashShelfController::OnAutoHideBehaviorChanged( 163 void ChromeMashShelfController::OnAutoHideBehaviorChanged(
164 mash::shelf::mojom::AutoHideBehavior auto_hide) { 164 mash::shelf::mojom::AutoHideBehavior auto_hide) {
165 ash::SetShelfAutoHideBehaviorPref( 165 ash::SetShelfAutoHideBehaviorPref(
166 ProfileManager::GetActiveUserProfile()->GetPrefs(), 166 ProfileManager::GetActiveUserProfile()->GetPrefs(),
167 display::Screen::GetScreen()->GetPrimaryDisplay().id(), 167 display::Screen::GetScreen()->GetPrimaryDisplay().id(),
168 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); 168 static_cast<ash::ShelfAutoHideBehavior>(auto_hide));
169 } 169 }
170 170
171 void ChromeMashShelfController::OnAppImageUpdated(const std::string& app_id, 171 void ChromeMashShelfController::OnAppImageUpdated(const std::string& app_id,
172 const gfx::ImageSkia& image) { 172 const gfx::ImageSkia& image) {
173 shelf_controller_->SetItemImage(app_id, *image.bitmap()); 173 shelf_controller_->SetItemImage(app_id, *image.bitmap());
174 } 174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698