OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cocoa/apps/quit_with_apps_controller_mac.h" | 5 #include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/number_formatting.h" | 8 #include "base/i18n/number_formatting.h" |
9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_NOTIFICATION_DISPLAY_SOURCE), | 65 l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_NOTIFICATION_DISPLAY_SOURCE), |
66 replace_id, | 66 replace_id, |
67 rich_notification_data, | 67 rich_notification_data, |
68 this)); | 68 this)); |
69 } | 69 } |
70 | 70 |
71 QuitWithAppsController::~QuitWithAppsController() {} | 71 QuitWithAppsController::~QuitWithAppsController() {} |
72 | 72 |
73 void QuitWithAppsController::Display() {} | 73 void QuitWithAppsController::Display() {} |
74 | 74 |
75 void QuitWithAppsController::Error() {} | |
76 | |
77 void QuitWithAppsController::Close(bool by_user) { | 75 void QuitWithAppsController::Close(bool by_user) { |
78 if (by_user) | 76 if (by_user) |
79 suppress_for_session_ = true; | 77 suppress_for_session_ = true; |
80 } | 78 } |
81 | 79 |
82 void QuitWithAppsController::Click() { | 80 void QuitWithAppsController::Click() { |
83 g_browser_process->notification_ui_manager()->CancelById( | 81 g_browser_process->notification_ui_manager()->CancelById( |
84 id(), NotificationUIManager::GetProfileID(notification_profile_)); | 82 id(), NotificationUIManager::GetProfileID(notification_profile_)); |
85 } | 83 } |
86 | 84 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 141 |
144 // Always return false, the notification UI can be used to quit all apps which | 142 // Always return false, the notification UI can be used to quit all apps which |
145 // will cause Chrome to quit. | 143 // will cause Chrome to quit. |
146 return false; | 144 return false; |
147 } | 145 } |
148 | 146 |
149 // static | 147 // static |
150 void QuitWithAppsController::RegisterPrefs(PrefRegistrySimple* registry) { | 148 void QuitWithAppsController::RegisterPrefs(PrefRegistrySimple* registry) { |
151 registry->RegisterBooleanPref(prefs::kNotifyWhenAppsKeepChromeAlive, true); | 149 registry->RegisterBooleanPref(prefs::kNotifyWhenAppsKeepChromeAlive, true); |
152 } | 150 } |
OLD | NEW |