| 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 CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // Shows network details in Web UI options window. | 89 // Shows network details in Web UI options window. |
| 90 void ShowTabbedNetworkSettings(const Network* network) const; | 90 void ShowTabbedNetworkSettings(const Network* network) const; |
| 91 | 91 |
| 92 // Getters. | 92 // Getters. |
| 93 Delegate* delegate() const { return delegate_; } | 93 Delegate* delegate() const { return delegate_; } |
| 94 | 94 |
| 95 // Setters. | 95 // Setters. |
| 96 void set_min_width(int min_width) { min_width_ = min_width; } | 96 void set_min_width(int min_width) { min_width_ = min_width; } |
| 97 | 97 |
| 98 // Attempts to connect to the specified network. If the network is already |
| 99 // connected, or is connecting, then it shows the settings for the network. |
| 100 void ConnectToNetwork(Network* network); |
| 101 |
| 98 // Used in a closure for doing actual network connection. | 102 // Used in a closure for doing actual network connection. |
| 99 void DoConnect(Network* network); | 103 void DoConnect(Network* network); |
| 100 | 104 |
| 101 private: | 105 private: |
| 102 friend class NetworkMenuModel; | 106 friend class NetworkMenuModel; |
| 103 | 107 |
| 104 // Weak ptr to delegate. | 108 // Weak ptr to delegate. |
| 105 Delegate* delegate_; | 109 Delegate* delegate_; |
| 106 | 110 |
| 107 // Set to true if we are currently refreshing the menu. | 111 // Set to true if we are currently refreshing the menu. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 // without worrying that they will actually try to happen after the lifetime | 124 // without worrying that they will actually try to happen after the lifetime |
| 121 // of this object. | 125 // of this object. |
| 122 base::WeakPtrFactory<NetworkMenu> weak_pointer_factory_; | 126 base::WeakPtrFactory<NetworkMenu> weak_pointer_factory_; |
| 123 | 127 |
| 124 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); | 128 DISALLOW_COPY_AND_ASSIGN(NetworkMenu); |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 } // namespace chromeos | 131 } // namespace chromeos |
| 128 | 132 |
| 129 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ | 133 #endif // CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_H_ |
| OLD | NEW |