| OLD | NEW |
| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 ChromeLauncherController* ChromeLauncherController::instance_ = NULL; | 114 ChromeLauncherController* ChromeLauncherController::instance_ = NULL; |
| 115 | 115 |
| 116 namespace { | 116 namespace { |
| 117 | 117 |
| 118 // This will be used as placeholder in the list of the pinned applciatons. | 118 // This will be used as placeholder in the list of the pinned applciatons. |
| 119 // Note that this is NOT a valid extension identifier so that pre M31 versions | 119 // Note that this is NOT a valid extension identifier so that pre M31 versions |
| 120 // will ignore it. | 120 // will ignore it. |
| 121 const char kAppShelfIdPlaceholder[] = "AppShelfIDPlaceholder--------"; | 121 const char kAppShelfIdPlaceholder[] = "AppShelfIDPlaceholder--------"; |
| 122 | 122 |
| 123 std::string GetPrefKeyForRootWindow(aura::Window* root_window) { | 123 std::string GetPrefKeyForRootWindow(aura::Window* root_window) { |
| 124 gfx::Display display = gfx::Screen::GetScreenFor( | 124 gfx::Display display = |
| 125 root_window)->GetDisplayNearestWindow(root_window); | 125 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window); |
| 126 DCHECK(display.is_valid()); | 126 DCHECK(display.is_valid()); |
| 127 | 127 |
| 128 return base::Int64ToString(display.id()); | 128 return base::Int64ToString(display.id()); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void UpdatePerDisplayPref(PrefService* pref_service, | 131 void UpdatePerDisplayPref(PrefService* pref_service, |
| 132 aura::Window* root_window, | 132 aura::Window* root_window, |
| 133 const char* pref_key, | 133 const char* pref_key, |
| 134 const std::string& value) { | 134 const std::string& value) { |
| 135 std::string key = GetPrefKeyForRootWindow(root_window); | 135 std::string key = GetPrefKeyForRootWindow(root_window); |
| (...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 void ChromeLauncherController::ReleaseProfile() { | 2226 void ChromeLauncherController::ReleaseProfile() { |
| 2227 if (app_sync_ui_state_) | 2227 if (app_sync_ui_state_) |
| 2228 app_sync_ui_state_->RemoveObserver(this); | 2228 app_sync_ui_state_->RemoveObserver(this); |
| 2229 | 2229 |
| 2230 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); | 2230 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); |
| 2231 | 2231 |
| 2232 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); | 2232 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); |
| 2233 | 2233 |
| 2234 pref_change_registrar_.RemoveAll(); | 2234 pref_change_registrar_.RemoveAll(); |
| 2235 } | 2235 } |
| OLD | NEW |