| 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/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 void OnAcceptMultiprofilesIntro(bool no_show_again) { | 179 void OnAcceptMultiprofilesIntro(bool no_show_again) { |
| 180 PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); | 180 PrefService* prefs = ProfileManager::GetActiveUserProfile()->GetPrefs(); |
| 181 prefs->SetBoolean(prefs::kMultiProfileNeverShowIntro, no_show_again); | 181 prefs->SetBoolean(prefs::kMultiProfileNeverShowIntro, no_show_again); |
| 182 UserAddingScreen::Get()->Start(); | 182 UserAddingScreen::Get()->Start(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace | 185 } // namespace |
| 186 | 186 |
| 187 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() | 187 SystemTrayDelegateChromeOS::SystemTrayDelegateChromeOS() |
| 188 : weak_ptr_factory_(this), | 188 : user_profile_(NULL), |
| 189 user_profile_(NULL), | |
| 190 clock_type_(base::GetHourClockType()), | 189 clock_type_(base::GetHourClockType()), |
| 191 search_key_mapped_to_(input_method::kSearchKey), | 190 search_key_mapped_to_(input_method::kSearchKey), |
| 192 screen_locked_(false), | 191 screen_locked_(false), |
| 193 have_session_start_time_(false), | 192 have_session_start_time_(false), |
| 194 have_session_length_limit_(false), | 193 have_session_length_limit_(false), |
| 195 should_run_bluetooth_discovery_(false), | 194 should_run_bluetooth_discovery_(false), |
| 196 volume_control_delegate_(new VolumeController()), | 195 volume_control_delegate_(new VolumeController()), |
| 197 device_settings_observer_(CrosSettings::Get()->AddSettingsObserver( | 196 device_settings_observer_(CrosSettings::Get()->AddSettingsObserver( |
| 198 kSystemUse24HourClock, | 197 kSystemUse24HourClock, |
| 199 base::Bind(&SystemTrayDelegateChromeOS::UpdateClockType, | 198 base::Bind(&SystemTrayDelegateChromeOS::UpdateClockType, |
| 200 base::Unretained(this)))) { | 199 base::Unretained(this)))), |
| 200 weak_ptr_factory_(this) { |
| 201 // Register notifications on construction so that events such as | 201 // Register notifications on construction so that events such as |
| 202 // PROFILE_CREATED do not get missed if they happen before Initialize(). | 202 // PROFILE_CREATED do not get missed if they happen before Initialize(). |
| 203 registrar_.reset(new content::NotificationRegistrar); | 203 registrar_.reset(new content::NotificationRegistrar); |
| 204 registrar_->Add(this, | 204 registrar_->Add(this, |
| 205 chrome::NOTIFICATION_UPGRADE_RECOMMENDED, | 205 chrome::NOTIFICATION_UPGRADE_RECOMMENDED, |
| 206 content::NotificationService::AllSources()); | 206 content::NotificationService::AllSources()); |
| 207 registrar_->Add(this, | 207 registrar_->Add(this, |
| 208 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, | 208 chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, |
| 209 content::NotificationService::AllSources()); | 209 content::NotificationService::AllSources()); |
| 210 if (GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) { | 210 if (GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) { |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 accessibility_subscription_.reset(); | 1292 accessibility_subscription_.reset(); |
| 1293 else | 1293 else |
| 1294 OnAccessibilityModeChanged(details.notify); | 1294 OnAccessibilityModeChanged(details.notify); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1297 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1298 return new SystemTrayDelegateChromeOS(); | 1298 return new SystemTrayDelegateChromeOS(); |
| 1299 } | 1299 } |
| 1300 | 1300 |
| 1301 } // namespace chromeos | 1301 } // namespace chromeos |
| OLD | NEW |