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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 14 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
15 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | |
16 #include "chromeos/network/network_state_handler.h" | 15 #include "chromeos/network/network_state_handler.h" |
17 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
18 #include "ui/base/models/menu_model.h" | 17 #include "ui/base/models/menu_model.h" |
19 #include "ui/base/webui/web_ui_util.h" | 18 #include "ui/base/webui/web_ui_util.h" |
20 #include "ui/chromeos/network/network_icon.h" | 19 #include "ui/chromeos/network/network_icon.h" |
21 #include "ui/chromeos/network/network_icon_animation.h" | 20 #include "ui/chromeos/network/network_icon_animation.h" |
22 #include "ui/gfx/font_list.h" | 21 #include "ui/gfx/font_list.h" |
23 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
24 #include "ui/gfx/image/image_skia.h" | 23 #include "ui/gfx/image/image_skia.h" |
25 | 24 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 NetworkHandler::Get()->network_state_handler()->RemoveObserver( | 138 NetworkHandler::Get()->network_state_handler()->RemoveObserver( |
140 this, FROM_HERE); | 139 this, FROM_HERE); |
141 } | 140 } |
142 } | 141 } |
143 | 142 |
144 void NetworkDropdown::OnItemChosen(int id) { | 143 void NetworkDropdown::OnItemChosen(int id) { |
145 network_menu_->OnItemChosen(id); | 144 network_menu_->OnItemChosen(id); |
146 } | 145 } |
147 | 146 |
148 gfx::NativeWindow NetworkDropdown::GetNativeWindow() const { | 147 gfx::NativeWindow NetworkDropdown::GetNativeWindow() const { |
149 return LoginDisplayHostImpl::default_host()->GetNativeWindow(); | 148 return LoginDisplayHost::default_host()->GetNativeWindow(); |
150 } | 149 } |
151 | 150 |
152 void NetworkDropdown::OpenButtonOptions() { | 151 void NetworkDropdown::OpenButtonOptions() { |
153 LoginDisplayHostImpl::default_host()->OpenProxySettings(); | 152 LoginDisplayHost::default_host()->OpenProxySettings(); |
154 } | 153 } |
155 | 154 |
156 bool NetworkDropdown::ShouldOpenButtonOptions() const { | 155 bool NetworkDropdown::ShouldOpenButtonOptions() const { |
157 return !oobe_; | 156 return !oobe_; |
158 } | 157 } |
159 | 158 |
160 void NetworkDropdown::OnConnectToNetworkRequested() { | 159 void NetworkDropdown::OnConnectToNetworkRequested() { |
161 actor_->OnConnectToNetworkRequested(); | 160 actor_->OnConnectToNetworkRequested(); |
162 } | 161 } |
163 | 162 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", | 203 web_ui_->CallJavascriptFunction("cr.ui.DropDown.updateNetworkTitle", |
205 title, icon); | 204 title, icon); |
206 } | 205 } |
207 | 206 |
208 void NetworkDropdown::RequestNetworkScan() { | 207 void NetworkDropdown::RequestNetworkScan() { |
209 NetworkHandler::Get()->network_state_handler()->RequestScan(); | 208 NetworkHandler::Get()->network_state_handler()->RequestScan(); |
210 Refresh(); | 209 Refresh(); |
211 } | 210 } |
212 | 211 |
213 } // namespace chromeos | 212 } // namespace chromeos |
OLD | NEW |