OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYSTEM_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H_ | 5 #ifndef ASH_SYSTEM_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H_ |
6 #define ASH_SYSTEM_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H_ | 6 #define ASH_SYSTEM_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "ash/login_status.h" | 11 #include "ash/login_status.h" |
12 #include "ash/system/network/network_detailed_view.h" | |
13 #include "ash/system/network/network_list_delegate.h" | 12 #include "ash/system/network/network_list_delegate.h" |
13 #include "ash/system/tray/tray_details_view.h" | |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
17 #include "ui/views/controls/button/button.h" | 17 #include "ui/views/controls/button/button.h" |
18 #include "ui/views/controls/button/custom_button.h" | 18 #include "ui/views/controls/button/custom_button.h" |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 class NetworkTypePattern; | 21 class NetworkTypePattern; |
22 } | 22 } |
23 | 23 |
24 namespace ash { | 24 namespace ash { |
25 class NetworkListViewBase; | 25 class NetworkListViewBase; |
26 } | 26 } |
27 | 27 |
28 namespace views { | 28 namespace views { |
29 class BubbleDialogDelegateView; | 29 class BubbleDialogDelegateView; |
30 } | 30 } |
31 | 31 |
32 namespace ash { | 32 namespace ash { |
33 class SystemTrayItem; | 33 class SystemTrayItem; |
34 | 34 |
35 namespace tray { | 35 namespace tray { |
36 | 36 |
37 class NetworkStateListDetailedView | 37 class NetworkStateListDetailedView |
38 : public NetworkDetailedView, | 38 : public TrayDetailsView, |
39 public NetworkListDelegate, | 39 public NetworkListDelegate, |
40 public base::SupportsWeakPtr<NetworkStateListDetailedView> { | 40 public base::SupportsWeakPtr<NetworkStateListDetailedView> { |
41 public: | 41 public: |
42 enum ListType { LIST_TYPE_NETWORK, LIST_TYPE_VPN }; | 42 enum ListType { LIST_TYPE_NETWORK, LIST_TYPE_VPN }; |
43 | 43 |
44 NetworkStateListDetailedView(SystemTrayItem* owner, | 44 NetworkStateListDetailedView(SystemTrayItem* owner, |
45 ListType list_type, | 45 ListType list_type, |
46 LoginStatus login); | 46 LoginStatus login); |
47 ~NetworkStateListDetailedView() override; | 47 ~NetworkStateListDetailedView() override; |
48 | 48 |
49 // Overridden from NetworkDetailedView: | 49 void Init(); |
50 void Init() override; | 50 |
51 DetailedViewType GetViewType() const override; | 51 // Called when the contents of the network list have changed or when any |
52 void Update() override; | 52 // Manager properties (e.g. technology state) have changed. |
53 //(Called only from TrayNetworkStateObserver). | |
James Cook
2017/04/26 01:06:30
nit: space before (, or better yet eliminate this
tetsui2
2017/04/26 01:10:16
Done.
| |
54 void Update(); | |
53 | 55 |
54 private: | 56 private: |
55 class InfoBubble; | 57 class InfoBubble; |
56 | 58 |
57 // TrayDetailsView: | 59 // TrayDetailsView: |
58 void HandleViewClicked(views::View* view) override; | 60 void HandleViewClicked(views::View* view) override; |
59 void HandleButtonPressed(views::Button* sender, | 61 void HandleButtonPressed(views::Button* sender, |
60 const ui::Event& event) override; | 62 const ui::Event& event) override; |
61 void CreateExtraTitleRowButtons() override; | 63 void CreateExtraTitleRowButtons() override; |
62 | 64 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 108 |
107 std::unique_ptr<NetworkListViewBase> network_list_view_; | 109 std::unique_ptr<NetworkListViewBase> network_list_view_; |
108 | 110 |
109 DISALLOW_COPY_AND_ASSIGN(NetworkStateListDetailedView); | 111 DISALLOW_COPY_AND_ASSIGN(NetworkStateListDetailedView); |
110 }; | 112 }; |
111 | 113 |
112 } // namespace tray | 114 } // namespace tray |
113 } // namespace ash | 115 } // namespace ash |
114 | 116 |
115 #endif // ASH_SYSTEM_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H_ | 117 #endif // ASH_SYSTEM_NETWORK_NETWORK_STATE_LIST_DETAILED_VIEW_H_ |
OLD | NEW |