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

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

Issue 2640023005: Load shelf preferences from ChromeLauncherController::AttachProfile. (Closed)
Patch Set: Revert SetPerDisplayPref change. Created 3 years, 11 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 | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc » ('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 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 "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/extensions/extension_app_icon_loader.h" 8 #include "chrome/browser/extensions/extension_app_icon_loader.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" 10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 base::MakeUnique<extensions::ExtensionAppIconLoader>( 141 base::MakeUnique<extensions::ExtensionAppIconLoader>(
142 profile_, extension_misc::EXTENSION_ICON_SMALL, this); 142 profile_, extension_misc::EXTENSION_ICON_SMALL, this);
143 app_icon_loaders_.push_back(std::move(extension_app_icon_loader)); 143 app_icon_loaders_.push_back(std::move(extension_app_icon_loader));
144 144
145 if (arc::ArcSessionManager::IsAllowedForProfile(profile_)) { 145 if (arc::ArcSessionManager::IsAllowedForProfile(profile_)) {
146 std::unique_ptr<AppIconLoader> arc_app_icon_loader = 146 std::unique_ptr<AppIconLoader> arc_app_icon_loader =
147 base::MakeUnique<ArcAppIconLoader>( 147 base::MakeUnique<ArcAppIconLoader>(
148 profile_, extension_misc::EXTENSION_ICON_SMALL, this); 148 profile_, extension_misc::EXTENSION_ICON_SMALL, this);
149 app_icon_loaders_.push_back(std::move(arc_app_icon_loader)); 149 app_icon_loaders_.push_back(std::move(arc_app_icon_loader));
150 } 150 }
151
152 SetShelfBehaviorsFromPrefs();
151 } 153 }
152 154
153 void ChromeLauncherController::OnShelfCreated(int64_t display_id) { 155 void ChromeLauncherController::OnShelfCreated(int64_t display_id) {
154 if (!ConnectToShelfController()) 156 if (!ConnectToShelfController())
155 return; 157 return;
156 158
157 // The pref helper functions return default values for invalid display ids. 159 // The pref helper functions return default values for invalid display ids.
158 PrefService* prefs = profile_->GetPrefs(); 160 PrefService* prefs = profile_->GetPrefs();
159 shelf_controller_->SetAlignment( 161 shelf_controller_->SetAlignment(
160 ash::launcher::GetShelfAlignmentPref(prefs, display_id), display_id); 162 ash::launcher::GetShelfAlignmentPref(prefs, display_id), display_id);
(...skipping 20 matching lines...) Expand all
181 // TODO(msw): Avoid handling this pref change and forwarding the value to ash. 183 // TODO(msw): Avoid handling this pref change and forwarding the value to ash.
182 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, 184 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id,
183 auto_hide); 185 auto_hide);
184 } 186 }
185 187
186 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, 188 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id,
187 const gfx::ImageSkia& image) { 189 const gfx::ImageSkia& image) {
188 // Implemented by subclasses; this should not be called. 190 // Implemented by subclasses; this should not be called.
189 NOTREACHED(); 191 NOTREACHED();
190 } 192 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698