OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 NetworkListViewBase(); | 22 NetworkListViewBase(); |
23 virtual ~NetworkListViewBase(); | 23 virtual ~NetworkListViewBase(); |
24 | 24 |
25 void set_container(views::View* container) { container_ = container; } | 25 void set_container(views::View* container) { container_ = container; } |
26 | 26 |
27 // Refreshes the network list. | 27 // Refreshes the network list. |
28 virtual void Update() = 0; | 28 virtual void Update() = 0; |
29 | 29 |
30 // Checks whether |view| represents a network in the list. If yes, sets | 30 // Checks whether |view| represents a network in the list. If yes, sets |
31 // |service_path| to the network's service path and returns |true|. Otherwise, | 31 // |guid| to the network's guid and returns |true|. Otherwise, |
32 // leaves |sevice_path| unchanged and returns |false|. | 32 // leaves |guid| unchanged and returns |false|. |
33 virtual bool IsNetworkEntry(views::View* view, | 33 virtual bool IsNetworkEntry(views::View* view, std::string* guid) const = 0; |
34 std::string* service_path) const = 0; | |
35 | 34 |
36 protected: | 35 protected: |
37 views::View* container() { return container_; } | 36 views::View* container() { return container_; } |
38 | 37 |
39 private: | 38 private: |
40 // The container that holds the actual list entries. | 39 // The container that holds the actual list entries. |
41 views::View* container_ = nullptr; | 40 views::View* container_ = nullptr; |
42 | 41 |
43 DISALLOW_COPY_AND_ASSIGN(NetworkListViewBase); | 42 DISALLOW_COPY_AND_ASSIGN(NetworkListViewBase); |
44 }; | 43 }; |
45 | 44 |
46 } // namespace ash | 45 } // namespace ash |
47 | 46 |
48 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ | 47 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ |
OLD | NEW |