Index: chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h |
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..820130f475c70b1e067cc689fb86ec58b40e3801 |
--- /dev/null |
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_COCOA_APPS_QUIT_WITH_APPS_CONTROLLER_MAC_H_ |
+#define CHROME_BROWSER_UI_COCOA_APPS_QUIT_WITH_APPS_CONTROLLER_MAC_H_ |
+ |
+#include "chrome/browser/notifications/notification.h" |
tapted
2014/04/01 08:09:45
nit: #include scoped_ptr
some would say you shoul
jackhou1
2014/04/02 06:38:38
Done.
|
+ |
+// QuitWithAppsController checks whether any apps are running and shows a |
+// notification to quit all of them. |
+class QuitWithAppsController : public NotificationDelegate { |
+ public: |
+ QuitWithAppsController(); |
+ |
+ static const char kQuitWithApps[]; |
tapted
2014/04/01 08:09:45
nit: maybe 'kQuitWithAppsNotificationID'
also I t
jackhou1
2014/04/02 06:38:38
Done.
|
+ |
+ // NotificationDelegate interface. |
+ virtual void Display() OVERRIDE; |
+ virtual void Error() OVERRIDE; |
+ virtual void Close(bool by_user) OVERRIDE; |
+ virtual void Click() OVERRIDE; |
+ virtual void ButtonClick(int button_index) OVERRIDE; |
+ virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; |
+ virtual std::string id() const OVERRIDE; |
+ |
+ // Attempt to quit Chrome. This will display a notification and return false |
+ // if there are apps running. |
+ bool ShouldQuit(); |
+ |
+ private: |
+ virtual ~QuitWithAppsController(); |
+ |
+ scoped_ptr<Notification> notification_; |
+ |
+ bool suppress_for_session_; |
tapted
2014/04/01 08:09:45
nit: maybe a comment for this - i had to look up a
jackhou1
2014/04/02 06:38:38
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(QuitWithAppsController); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_COCOA_APPS_QUIT_WITH_APPS_CONTROLLER_MAC_H_ |