Chromium Code Reviews| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 using content::WebContents; | 99 using content::WebContents; |
| 100 | 100 |
| 101 // static | 101 // static |
| 102 ChromeLauncherController* ChromeLauncherController::instance_ = NULL; | 102 ChromeLauncherController* ChromeLauncherController::instance_ = NULL; |
| 103 | 103 |
| 104 namespace { | 104 namespace { |
| 105 | 105 |
| 106 // This will be used as placeholder in the list of the pinned applciatons. | 106 // This will be used as placeholder in the list of the pinned applciatons. |
| 107 // Note that this is NOT a valid extension identifier so that pre M31 versions | 107 // Note that this is NOT a valid extension identifier so that pre M31 versions |
| 108 // will ignore it. | 108 // will ignore it. |
| 109 const char kAppLauncherIdPlaceholder[] = "AppLauncherIDPlaceholder--------"; | 109 const char kAppLauncherIdPlaceholder[] = "AppLauncherIDPlaceholder-------x"; |
|
xiyuan
2013/12/19 01:45:41
We don't want to check in this. It is a temp work
zel
2013/12/19 23:28:02
Done.
| |
| 110 | 110 |
| 111 std::string GetPrefKeyForRootWindow(aura::Window* root_window) { | 111 std::string GetPrefKeyForRootWindow(aura::Window* root_window) { |
| 112 gfx::Display display = gfx::Screen::GetScreenFor( | 112 gfx::Display display = gfx::Screen::GetScreenFor( |
| 113 root_window)->GetDisplayNearestWindow(root_window); | 113 root_window)->GetDisplayNearestWindow(root_window); |
| 114 DCHECK(display.is_valid()); | 114 DCHECK(display.is_valid()); |
| 115 | 115 |
| 116 return base::Int64ToString(display.id()); | 116 return base::Int64ToString(display.id()); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void UpdatePerDisplayPref(PrefService* pref_service, | 119 void UpdatePerDisplayPref(PrefService* pref_service, |
| (...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2015 } | 2015 } |
| 2016 | 2016 |
| 2017 void ChromeLauncherController::ReleaseProfile() { | 2017 void ChromeLauncherController::ReleaseProfile() { |
| 2018 if (app_sync_ui_state_) | 2018 if (app_sync_ui_state_) |
| 2019 app_sync_ui_state_->RemoveObserver(this); | 2019 app_sync_ui_state_->RemoveObserver(this); |
| 2020 | 2020 |
| 2021 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2021 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
| 2022 | 2022 |
| 2023 pref_change_registrar_.RemoveAll(); | 2023 pref_change_registrar_.RemoveAll(); |
| 2024 } | 2024 } |
| OLD | NEW |