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

Unified Diff: ash/system/network/network_observer.h

Issue 10407080: Add NetworkNotificationView to tray_network. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 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: ash/system/network/network_observer.h
diff --git a/ash/system/network/network_observer.h b/ash/system/network/network_observer.h
index 4756db917fff6d150a5cdbef621a42677ee2b469..afd0722afeea7fd37e8172c94dc2f74cbe8dc4ca 100644
--- a/ash/system/network/network_observer.h
+++ b/ash/system/network/network_observer.h
@@ -6,15 +6,43 @@
#define ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
#pragma once
+#include "base/string16.h"
+
namespace ash {
struct NetworkIconInfo;
+class NetworkTrayDelegate;
+
+class NetworkTrayDelegate {
+ public:
+ virtual ~NetworkTrayDelegate() {}
+
+ virtual void NotificationLinkClicked() = 0;
+};
class NetworkObserver {
public:
+ enum ErrorType {
+ // Priority order, highest to lowest.
+ ERROR_CONNECT_FAILED,
+ ERROR_DATA_NONE,
+ ERROR_DATA_LOW
+ };
+
virtual ~NetworkObserver() {}
virtual void OnNetworkRefresh(const NetworkIconInfo& info) = 0;
+
+ // Sets a network error notification. |error_type| identifies the type of
+ // error. |delegate|->NotificationLinkClicked() will be called if |link_text|
+ // is clicked (if supplied, |link_text| may be empty).
+ virtual void SetNetworkError(NetworkTrayDelegate* delegate,
+ ErrorType error_type,
+ const string16& title,
+ const string16& message,
+ const string16& link_text) = 0;
+ // Clears the error notification for |error_type|.
+ virtual void ClearNetworkError(ErrorType error_type) = 0;
};
} // namespace ash
« no previous file with comments | « no previous file | ash/system/network/tray_network.h » ('j') | chrome/browser/chromeos/network_message_observer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698