OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_per_browser.
h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.
h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 value = ash::kShelfAutoHideBehaviorAlways; | 1080 value = ash::kShelfAutoHideBehaviorAlways; |
1081 break; | 1081 break; |
1082 case ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER: | 1082 case ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER: |
1083 value = ash::kShelfAutoHideBehaviorNever; | 1083 value = ash::kShelfAutoHideBehaviorNever; |
1084 break; | 1084 break; |
1085 } | 1085 } |
1086 | 1086 |
1087 UpdatePerDisplayPref( | 1087 UpdatePerDisplayPref( |
1088 profile_->GetPrefs(), root_window, prefs::kShelfAutoHideBehavior, value); | 1088 profile_->GetPrefs(), root_window, prefs::kShelfAutoHideBehavior, value); |
1089 | 1089 |
1090 if (root_window != ash::Shell::GetPrimaryRootWindow()) { | 1090 if (root_window == ash::Shell::GetPrimaryRootWindow()) { |
1091 // See comment in |kShelfAlignment| about why we have two prefs here. | 1091 // See comment in |kShelfAlignment| about why we have two prefs here. |
1092 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehaviorLocal, value); | 1092 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehaviorLocal, value); |
1093 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehavior, value); | 1093 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehavior, value); |
1094 } | 1094 } |
1095 } | 1095 } |
1096 | 1096 |
1097 void ChromeLauncherControllerPerBrowser::SetShelfAutoHideBehaviorFromPrefs() { | 1097 void ChromeLauncherControllerPerBrowser::SetShelfAutoHideBehaviorFromPrefs() { |
1098 ash::Shell::RootWindowList root_windows; | 1098 ash::Shell::RootWindowList root_windows; |
1099 if (ash::Shell::IsLauncherPerDisplayEnabled()) | 1099 if (ash::Shell::IsLauncherPerDisplayEnabled()) |
1100 root_windows = ash::Shell::GetAllRootWindows(); | 1100 root_windows = ash::Shell::GetAllRootWindows(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest( | 1206 void ChromeLauncherControllerPerBrowser::SetAppIconLoaderForTest( |
1207 AppIconLoader* loader) { | 1207 AppIconLoader* loader) { |
1208 app_icon_loader_.reset(loader); | 1208 app_icon_loader_.reset(loader); |
1209 } | 1209 } |
1210 | 1210 |
1211 const std::string& | 1211 const std::string& |
1212 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest( | 1212 ChromeLauncherControllerPerBrowser::GetAppIdFromLauncherIdForTest( |
1213 ash::LauncherID id) { | 1213 ash::LauncherID id) { |
1214 return id_to_item_controller_map_[id]->app_id(); | 1214 return id_to_item_controller_map_[id]->app_id(); |
1215 } | 1215 } |
OLD | NEW |