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 UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ | 5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ |
6 #define UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ | 6 #define UI_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 17 matching lines...) Expand all Loading... |
28 // Refreshes the network list. | 28 // Refreshes the network list. |
29 virtual void Update() = 0; | 29 virtual void Update() = 0; |
30 | 30 |
31 // Checks whether |view| represents a network in the list. If yes, sets | 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, | 32 // |service_path| to the network's service path and returns |true|. Otherwise, |
33 // leaves |sevice_path| unchanged and returns |false|. | 33 // leaves |sevice_path| unchanged and returns |false|. |
34 virtual bool IsNetworkEntry(views::View* view, | 34 virtual bool IsNetworkEntry(views::View* view, |
35 std::string* service_path) const = 0; | 35 std::string* service_path) const = 0; |
36 | 36 |
37 protected: | 37 protected: |
| 38 views::View* container() { return container_; } |
| 39 |
| 40 private: |
38 // The container that holds the actual list entries. | 41 // The container that holds the actual list entries. |
39 views::View* container_ = nullptr; | 42 views::View* container_ = nullptr; |
40 | 43 |
41 private: | |
42 DISALLOW_COPY_AND_ASSIGN(NetworkListViewBase); | 44 DISALLOW_COPY_AND_ASSIGN(NetworkListViewBase); |
43 }; | 45 }; |
44 | 46 |
45 } // namespace ui | 47 } // namespace ui |
46 | 48 |
47 #endif // UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ | 49 #endif // UI_CHROMEOS_NETWORK_NETWORK_LIST_VIEW_BASE_H_ |
OLD | NEW |