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

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

Issue 2435903002: Move tray code from ui/chromeos/network/ (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « ui/chromeos/network/network_list_md.cc ('k') | ui/chromeos/network/network_list_view_base.cc » ('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 2015 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_VIEW_BASE_H_
6 #define UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "ui/chromeos/ui_chromeos_export.h"
12
13 namespace views {
14 class View;
15 }
16
17 namespace ui {
18
19 // Base class for a list of available networks (and, in the case of VPNs, the
20 // list of available VPN providers).
21 class UI_CHROMEOS_EXPORT NetworkListViewBase {
22 public:
23 NetworkListViewBase();
24 virtual ~NetworkListViewBase();
25
26 void set_container(views::View* container) { container_ = container; }
27
28 // Refreshes the network list.
29 virtual void Update() = 0;
30
31 // Checks whether |view| represents a network in the list. If yes, sets
32 // |service_path| to the network's service path and returns |true|. Otherwise,
33 // leaves |sevice_path| unchanged and returns |false|.
34 virtual bool IsNetworkEntry(views::View* view,
35 std::string* service_path) const = 0;
36
37 protected:
38 views::View* container() { return container_; }
39
40 private:
41 // The container that holds the actual list entries.
42 views::View* container_ = nullptr;
43
44 DISALLOW_COPY_AND_ASSIGN(NetworkListViewBase);
45 };
46
47 } // namespace ui
48
49 #endif // UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_
OLDNEW
« no previous file with comments | « ui/chromeos/network/network_list_md.cc ('k') | ui/chromeos/network/network_list_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698