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

Side by Side Diff: ui/chromeos/network/network_list_delegate.h

Issue 417793003: chromeos: Refactor the code for showing the network UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-build Created 6 years, 5 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
(Empty)
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 UI_CHROMEOS_NETWORK_NETWORK_LIST_DELEGATE_H_
6 #define UI_CHROMEOS_NETWORK_NETWORK_LIST_DELEGATE_H_
7
8 #include "ui/chromeos/ui_chromeos_export.h"
9
10 namespace chromeos {
11 class NetworkState;
12 }
13
14 namespace views {
15 class Label;
16 class View;
17 }
18
19 namespace ui {
20
21 struct NetworkInfo;
22
23 class UI_CHROMEOS_EXPORT NetworkListDelegate {
24 public:
25 virtual ~NetworkListDelegate() {}
26
27 // Returns true if |network| should not be added to the list.
28 virtual bool ShouldSkipNetwork(const chromeos::NetworkState& network) = 0;
29
30 // Creates and returns a View with the information in |info|.
31 virtual views::View* CreateViewForNetwork(const NetworkInfo& info) = 0;
32
33 // Returns true if |view| is currently under the cursor. Note that |view| is
34 // guaranteed to be a View returned from |CreateViewForNetwork()|.
35 virtual bool IsViewHovered(views::View* view) = 0;
36
37 // Returns whether only VPN networks should be listed.
38 virtual bool ShouldListOnlyVPN() const = 0;
39
40 // Updates |view| with the information in |info|. Note that |view| is
41 // guaranteed to be a View returned from |CreateViewForNetwork()|.
42 virtual void UpdateViewForNetwork(views::View* view,
43 const NetworkInfo& info) = 0;
44
45 // Returns whether any View was updated that needs a relayout of the list.
46 virtual bool OnNetworkListIsEmpty() = 0;
stevenjb 2014/07/24 19:13:54 The purpose of this is unclear and appears to be u
sadrul 2014/07/24 20:38:45 Good catch. Removed.
47
48 // Creates a Label to be displayed in the list to present some information
49 // (e.g. unavailability of network etc.).
50 virtual views::Label* CreateInfoLabel() = 0;
51
52 virtual void RelayoutScrollList() = 0;
53 };
54
55 } // namespace ui
56
57 #endif // UI_CHROMEOS_NETWORK_NETWORK_LIST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698