Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / chromeos / network / network_list_view_base.h
blobf6cf067ae6c85e2013fc614718ded7b265ff7438
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.
5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_
6 #define UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "ui/chromeos/ui_chromeos_export.h"
13 namespace views {
14 class View;
17 namespace ui {
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();
26 void set_container(views::View* container) { container_ = container; }
28 // Refreshes the network list.
29 virtual void Update() = 0;
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;
37 protected:
38 // The container that holds the actual list entries.
39 views::View* container_ = nullptr;
41 private:
42 DISALLOW_COPY_AND_ASSIGN(NetworkListViewBase);
45 } // namespace ui
47 #endif // UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_