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

Unified Diff: chrome/browser/chromeos/file_system_provider/notification_manager_interface.h

Issue 350683002: [fsp] Add notifications in case of slow operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/notification_manager_interface.h
diff --git a/chrome/browser/chromeos/file_system_provider/notification_manager_interface.h b/chrome/browser/chromeos/file_system_provider/notification_manager_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b889e1d0d805d6e42984a9c970564e305acea86
--- /dev/null
+++ b/chrome/browser/chromeos/file_system_provider/notification_manager_interface.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_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_INTERFACE_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_INTERFACE_H_
+
+#include "base/callback.h"
+
+namespace chromeos {
+namespace file_system_provider {
+
+// Handles notifications related to provided the file system.
+class NotificationManagerInterface {
+ public:
+ // Result of a notification.
+ enum NotificationResult { ABORT, CONTINUE };
+
+ // Callback for handling result of a notification.
+ typedef base::Callback<void(NotificationResult)> NotificationCallback;
+
+ NotificationManagerInterface() {}
+ virtual ~NotificationManagerInterface() {}
+
+ // Shows a notification about the request being unresponsive. The |callback|
+ // is called when the notification is closed.
+ virtual void ShowUnresponsiveNotification(
+ int id,
+ const NotificationCallback& callback) = 0;
+
+ // Hides a notification previously shown with |id|.
+ virtual void HideUnresponsiveNotification(int id) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NotificationManagerInterface);
+};
+
+} // namespace file_system_provider
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_NOTIFICATION_MANAGER_INTERFACE_H_

Powered by Google App Engine
This is Rietveld 408576698