OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/status/network_menu_button.h" | 5 #include "chrome/browser/chromeos/status/network_menu_button.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 view->set_browser_mode(host_->IsBrowserMode()); | 126 view->set_browser_mode(host_->IsBrowserMode()); |
127 views::Window* window = views::Window::CreateChromeWindow( | 127 views::Window* window = views::Window::CreateChromeWindow( |
128 host_->GetNativeWindow(), gfx::Rect(), view); | 128 host_->GetNativeWindow(), gfx::Rect(), view); |
129 window->SetIsAlwaysOnTop(true); | 129 window->SetIsAlwaysOnTop(true); |
130 window->Show(); | 130 window->Show(); |
131 } | 131 } |
132 } else { | 132 } else { |
133 // If wifi network is not encrypted, then directly connect. | 133 // If wifi network is not encrypted, then directly connect. |
134 // Otherwise, we open password dialog window. | 134 // Otherwise, we open password dialog window. |
135 if (!wifi.encrypted()) { | 135 if (!wifi.encrypted()) { |
136 cros->ConnectToWifiNetwork(wifi, string16(), string16(), string16()); | 136 cros->ConnectToWifiNetwork(wifi, std::string(), |
| 137 std::string(), std::string()); |
137 } else { | 138 } else { |
138 NetworkConfigView* view = new NetworkConfigView(wifi, true); | 139 NetworkConfigView* view = new NetworkConfigView(wifi, true); |
139 view->set_browser_mode(host_->IsBrowserMode()); | 140 view->set_browser_mode(host_->IsBrowserMode()); |
140 views::Window* window = views::Window::CreateChromeWindow( | 141 views::Window* window = views::Window::CreateChromeWindow( |
141 host_->GetNativeWindow(), gfx::Rect(), view); | 142 host_->GetNativeWindow(), gfx::Rect(), view); |
142 window->SetIsAlwaysOnTop(true); | 143 window->SetIsAlwaysOnTop(true); |
143 window->Show(); | 144 window->Show(); |
144 view->SetLoginTextfieldFocus(); | 145 view->SetLoginTextfieldFocus(); |
145 } | 146 } |
146 } | 147 } |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 if (host_->ShouldOpenButtonOptions(this)) { | 517 if (host_->ShouldOpenButtonOptions(this)) { |
517 label = | 518 label = |
518 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_OPEN_OPTIONS_DIALOG); | 519 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_OPEN_OPTIONS_DIALOG); |
519 menu_items_.push_back(MenuItem(menus::MenuModel::TYPE_COMMAND, label, | 520 menu_items_.push_back(MenuItem(menus::MenuModel::TYPE_COMMAND, label, |
520 SkBitmap(), WifiNetwork(), CellularNetwork(), FLAG_OPTIONS)); | 521 SkBitmap(), WifiNetwork(), CellularNetwork(), FLAG_OPTIONS)); |
521 } | 522 } |
522 } | 523 } |
523 } | 524 } |
524 | 525 |
525 } // namespace chromeos | 526 } // namespace chromeos |
OLD | NEW |