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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_INTERFACE_H_ 7 8 #include "base/callback.h" 9 10 namespace chromeos { 11 namespace file_system_provider { 12 13 // Handles notifications related to provided the file system. 14 class NotificationManagerInterface { 15 public: 16 // Result of a notification. 17 enum NotificationResult { ABORT, CONTINUE }; 18 19 // Callback for handling result of a notification. 20 typedef base::Callback<void(NotificationResult)> NotificationCallback; 21 22 NotificationManagerInterface() {} 23 virtual ~NotificationManagerInterface() {} 24 25 // Shows a notification about the request being unresponsive. The |callback| 26 // is called when the notification is closed. 27 virtual void ShowUnresponsiveNotification( 28 int id, 29 const NotificationCallback& callback) = 0; 30 31 // Hides a notification previously shown with |id|. 32 virtual void HideUnresponsiveNotification(int id) = 0; 33 34 private: 35 DISALLOW_COPY_AND_ASSIGN(NotificationManagerInterface); 36 }; 37 38 } // namespace file_system_provider 39 } // namespace chromeos 40 41 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_INTERFACE_H_ 42