Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: chrome/browser/chromeos/status/network_menu.cc

Issue 607613002: Elim parent_window parameter from network_connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Elim includes Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 scoped_ptr<MoreMenuModel> more_menu_model_; 210 scoped_ptr<MoreMenuModel> more_menu_model_;
211 211
212 DISALLOW_COPY_AND_ASSIGN(MainMenuModel); 212 DISALLOW_COPY_AND_ASSIGN(MainMenuModel);
213 }; 213 };
214 214
215 //////////////////////////////////////////////////////////////////////////////// 215 ////////////////////////////////////////////////////////////////////////////////
216 // NetworkMenuModel, public methods: 216 // NetworkMenuModel, public methods:
217 217
218 void NetworkMenuModel::ConnectToNetworkAt(int index) { 218 void NetworkMenuModel::ConnectToNetworkAt(int index) {
219 const std::string& service_path = menu_items_[index].service_path; 219 const std::string& service_path = menu_items_[index].service_path;
220 gfx::NativeWindow native_window = owner_->delegate()->GetNativeWindow(); 220 ash::network_connect::ConnectToNetwork(service_path);
221 ash::network_connect::ConnectToNetwork(service_path, native_window);
222 } 221 }
223 222
224 //////////////////////////////////////////////////////////////////////////////// 223 ////////////////////////////////////////////////////////////////////////////////
225 // NetworkMenuModel, ui::MenuModel implementation: 224 // NetworkMenuModel, ui::MenuModel implementation:
226 225
227 bool NetworkMenuModel::HasIcons() const { 226 bool NetworkMenuModel::HasIcons() const {
228 return true; 227 return true;
229 } 228 }
230 229
231 int NetworkMenuModel::GetItemCount() const { 230 int NetworkMenuModel::GetItemCount() const {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 return main_menu_model_.get(); 673 return main_menu_model_.get();
675 } 674 }
676 675
677 void NetworkMenu::UpdateMenu() { 676 void NetworkMenu::UpdateMenu() {
678 refreshing_menu_ = true; 677 refreshing_menu_ = true;
679 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions()); 678 main_menu_model_->InitMenuItems(delegate_->ShouldOpenButtonOptions());
680 refreshing_menu_ = false; 679 refreshing_menu_ = false;
681 } 680 }
682 681
683 } // namespace chromeos 682 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/mobile/mobile_activator.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698