| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/chromeos/login/quick_unlock/quick_unlock_notification_c
ontroller.h" | 5 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_notification_c
ontroller.h" |
| 6 | 6 |
| 7 #include "ash/common/strings/grit/ash_strings.h" | 7 #include "ash/common/strings/grit/ash_strings.h" |
| 8 #include "ash/common/system/system_notifier.h" | 8 #include "ash/common/system/system_notifier.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 void QuickUnlockNotificationController::Close(bool by_user) { | 111 void QuickUnlockNotificationController::Close(bool by_user) { |
| 112 if (by_user) | 112 if (by_user) |
| 113 UpdatePreferenceForProfile(profile_); | 113 UpdatePreferenceForProfile(profile_); |
| 114 } | 114 } |
| 115 | 115 |
| 116 // message_center::NotificationDelegate override: | 116 // message_center::NotificationDelegate override: |
| 117 void QuickUnlockNotificationController::Click() { | 117 void QuickUnlockNotificationController::Click() { |
| 118 chrome::NavigateParams params(profile_, | 118 chrome::NavigateParams params(profile_, |
| 119 GURL(kChromeAuthenticationSettingsURL), | 119 GURL(kChromeAuthenticationSettingsURL), |
| 120 ui::PAGE_TRANSITION_LINK); | 120 ui::PAGE_TRANSITION_LINK); |
| 121 params.disposition = NEW_FOREGROUND_TAB; | 121 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; |
| 122 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 122 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 123 chrome::Navigate(¶ms); | 123 chrome::Navigate(¶ms); |
| 124 | 124 |
| 125 UpdatePreferenceForProfile(profile_); | 125 UpdatePreferenceForProfile(profile_); |
| 126 | 126 |
| 127 // Remove the notification from tray. | 127 // Remove the notification from tray. |
| 128 g_browser_process->notification_ui_manager()->CancelById( | 128 g_browser_process->notification_ui_manager()->CancelById( |
| 129 id(), NotificationUIManager::GetProfileID(profile_)); | 129 id(), NotificationUIManager::GetProfileID(profile_)); |
| 130 } | 130 } |
| 131 | 131 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 148 ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 148 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 149 IDR_SCREENSHOT_NOTIFICATION_ICON), | 149 IDR_SCREENSHOT_NOTIFICATION_ICON), |
| 150 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 150 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
| 151 ash::system_notifier::kNotifierQuickUnlock), | 151 ash::system_notifier::kNotifierQuickUnlock), |
| 152 l10n_util::GetStringUTF16( | 152 l10n_util::GetStringUTF16( |
| 153 IDS_MESSAGE_CENTER_NOTIFIER_QUICK_UNLOCK_FEATURE_NAME), | 153 IDS_MESSAGE_CENTER_NOTIFIER_QUICK_UNLOCK_FEATURE_NAME), |
| 154 GURL(), kNotificationId, message_center::RichNotificationData(), this); | 154 GURL(), kNotificationId, message_center::RichNotificationData(), this); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace chromeos | 157 } // namespace chromeos |
| OLD | NEW |