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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H 5 #ifndef ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
6 #define ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H 6 #define ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h"
10
9 namespace ash { 11 namespace ash {
10 12
11 struct NetworkIconInfo; 13 struct NetworkIconInfo;
14 class NetworkTrayDelegate;
15
16 class NetworkTrayDelegate {
17 public:
18 virtual ~NetworkTrayDelegate() {}
19
20 virtual void NotificationLinkClicked() = 0;
21 };
12 22
13 class NetworkObserver { 23 class NetworkObserver {
14 public: 24 public:
25 enum ErrorType {
26 // Priority order, highest to lowest.
27 ERROR_CONNECT_FAILED,
28 ERROR_DATA_NONE,
29 ERROR_DATA_LOW
30 };
31
15 virtual ~NetworkObserver() {} 32 virtual ~NetworkObserver() {}
16 33
17 virtual void OnNetworkRefresh(const NetworkIconInfo& info) = 0; 34 virtual void OnNetworkRefresh(const NetworkIconInfo& info) = 0;
35
36 // Sets a network error notification. |error_type| identifies the type of
37 // error. |delegate|->NotificationLinkClicked() will be called if |link_text|
38 // is clicked (if supplied, |link_text| may be empty).
39 virtual void SetNetworkError(NetworkTrayDelegate* delegate,
40 ErrorType error_type,
41 const string16& title,
42 const string16& message,
43 const string16& link_text) = 0;
44 // Clears the error notification for |error_type|.
45 virtual void ClearNetworkError(ErrorType error_type) = 0;
18 }; 46 };
19 47
20 } // namespace ash 48 } // namespace ash
21 49
22 #endif // ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H 50 #endif // ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
OLDNEW
« 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