| 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/chromeos/status/network_menu.h" | 5 #include "chrome/browser/chromeos/status/network_menu.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 scoped_ptr<MoreMenuModel> more_menu_model_; | 208 scoped_ptr<MoreMenuModel> more_menu_model_; |
| 209 | 209 |
| 210 DISALLOW_COPY_AND_ASSIGN(MainMenuModel); | 210 DISALLOW_COPY_AND_ASSIGN(MainMenuModel); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 //////////////////////////////////////////////////////////////////////////////// | 213 //////////////////////////////////////////////////////////////////////////////// |
| 214 // NetworkMenuModel, public methods: | 214 // NetworkMenuModel, public methods: |
| 215 | 215 |
| 216 void NetworkMenuModel::ConnectToNetworkAt(int index) { | 216 void NetworkMenuModel::ConnectToNetworkAt(int index) { |
| 217 LOG(ERROR) << "*** QUICHE: " << __func__; |
| 217 const std::string& service_path = menu_items_[index].service_path; | 218 const std::string& service_path = menu_items_[index].service_path; |
| 218 ui::NetworkConnect::Get()->ConnectToNetwork(service_path); | 219 ui::NetworkConnect::Get()->ConnectToNetwork(service_path); |
| 219 } | 220 } |
| 220 | 221 |
| 221 //////////////////////////////////////////////////////////////////////////////// | 222 //////////////////////////////////////////////////////////////////////////////// |
| 222 // NetworkMenuModel, ui::MenuModel implementation: | 223 // NetworkMenuModel, ui::MenuModel implementation: |
| 223 | 224 |
| 224 bool NetworkMenuModel::HasIcons() const { | 225 bool NetworkMenuModel::HasIcons() const { |
| 225 return true; | 226 return true; |
| 226 } | 227 } |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 return main_menu_model_.get(); | 672 return main_menu_model_.get(); |
| 672 } | 673 } |
| 673 | 674 |
| 674 void NetworkMenu::UpdateMenu() { | 675 void NetworkMenu::UpdateMenu() { |
| 675 refreshing_menu_ = true; | 676 refreshing_menu_ = true; |
| 676 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions()); | 677 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions()); |
| 677 refreshing_menu_ = false; | 678 refreshing_menu_ = false; |
| 678 } | 679 } |
| 679 | 680 |
| 680 } // namespace chromeos | 681 } // namespace chromeos |
| OLD | NEW |