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

Side by Side Diff: ash/system/network/network_observer.h

Issue 11039034: Move ash/system/network to ash/system/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 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
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | ash/system/network/sms_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
6 #define ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
7
8 #include <vector>
9
10 #include "base/string16.h"
11
12 namespace ash {
13
14 struct NetworkIconInfo;
15
16 class NetworkTrayDelegate {
17 public:
18 virtual ~NetworkTrayDelegate() {}
19
20 // Notifies that the |index|-th link on the notification is clicked.
21 virtual void NotificationLinkClicked(size_t index) = 0;
22 };
23
24 class NetworkObserver {
25 public:
26 enum MessageType {
27 // Priority order, highest to lowest.
28 ERROR_CONNECT_FAILED,
29
30 MESSAGE_DATA_NONE,
31 MESSAGE_DATA_LOW,
32 MESSAGE_DATA_PROMO,
33 };
34
35 virtual ~NetworkObserver() {}
36
37 virtual void OnNetworkRefresh(const NetworkIconInfo& info) = 0;
38
39 // Sets a network message notification. |message_type| identifies the type of
40 // message. |delegate|->NotificationLinkClicked() will be called if any of the
41 // |links| are clicked (if supplied, |links| may be empty).
42 virtual void SetNetworkMessage(NetworkTrayDelegate* delegate,
43 MessageType message_type,
44 const string16& title,
45 const string16& message,
46 const std::vector<string16>& links) = 0;
47 // Clears the message notification for |message_type|.
48 virtual void ClearNetworkMessage(MessageType message_type) = 0;
49
50 // Called when the user attempted to toggle Wi-Fi enable/disable.
51 // NOTE: Toggling is asynchronous and subsequent calls to query the current
52 // state may return the old value.
53 virtual void OnWillToggleWifi() = 0;
54 };
55
56 } // namespace ash
57
58 #endif // ASH_SYSTEM_NETWORK_NETWORK_OBSERVER_H
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | ash/system/network/sms_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698