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 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 namespace chromeos { | 31 namespace chromeos { |
32 | 32 |
33 // WebUI specific implementation of the NetworkMenu class. | 33 // WebUI specific implementation of the NetworkMenu class. |
34 class NetworkMenuWebUI : public NetworkMenu { | 34 class NetworkMenuWebUI : public NetworkMenu { |
35 public: | 35 public: |
36 NetworkMenuWebUI(NetworkMenu::Delegate* delegate, content::WebUI* web_ui); | 36 NetworkMenuWebUI(NetworkMenu::Delegate* delegate, content::WebUI* web_ui); |
37 | 37 |
38 // NetworkMenu override: | 38 // NetworkMenu override: |
39 virtual void UpdateMenu() OVERRIDE; | 39 virtual void UpdateMenu() override; |
40 | 40 |
41 // Called when item with command |id| is chosen. | 41 // Called when item with command |id| is chosen. |
42 void OnItemChosen(int id); | 42 void OnItemChosen(int id); |
43 | 43 |
44 private: | 44 private: |
45 // Converts menu model into the ListValue, ready for passing to WebUI. | 45 // Converts menu model into the ListValue, ready for passing to WebUI. |
46 base::ListValue* ConvertMenuModel(ui::MenuModel* model); | 46 base::ListValue* ConvertMenuModel(ui::MenuModel* model); |
47 | 47 |
48 // WebUI where network menu is located. | 48 // WebUI where network menu is located. |
49 content::WebUI* web_ui_; | 49 content::WebUI* web_ui_; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", | 198 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", |
199 title, icon); | 199 title, icon); |
200 } | 200 } |
201 | 201 |
202 void NetworkDropdown::RequestNetworkScan() { | 202 void NetworkDropdown::RequestNetworkScan() { |
203 NetworkHandler::Get()->network_state_handler()->RequestScan(); | 203 NetworkHandler::Get()->network_state_handler()->RequestScan(); |
204 Refresh(); | 204 Refresh(); |
205 } | 205 } |
206 | 206 |
207 } // namespace chromeos | 207 } // namespace chromeos |
OLD | NEW |