Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/browser/chromeos/login/quick_unlock/quick_unlock_notification_controller.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(&params); 123 chrome::Navigate(&params);
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc ('k') | chrome/browser/chromeos/login/screens/error_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698