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

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

Issue 8681029: [cros] Make disconnected icons used by network drop-down and network button consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: default Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 NetworkMenuButton::NetworkMenuButton(StatusAreaButton::Delegate* delegate) 101 NetworkMenuButton::NetworkMenuButton(StatusAreaButton::Delegate* delegate)
102 : StatusAreaButton(delegate, this), 102 : StatusAreaButton(delegate, this),
103 mobile_data_bubble_(NULL), 103 mobile_data_bubble_(NULL),
104 check_for_promo_(true), 104 check_for_promo_(true),
105 was_sim_locked_(false), 105 was_sim_locked_(false),
106 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { 106 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
107 set_id(VIEW_ID_STATUS_BUTTON_NETWORK_MENU); 107 set_id(VIEW_ID_STATUS_BUTTON_NETWORK_MENU);
108 network_menu_.reset(new NetworkMenu(this)); 108 network_menu_.reset(new NetworkMenu(this));
109 network_icon_.reset( 109 network_icon_.reset(
110 new NetworkMenuIcon(this, NetworkMenuIcon::MENU_MODE)); 110 new NetworkMenuIcon(this, NetworkMenuIcon::MENU_MODE, TYPE_WIFI));
111 111
112 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); 112 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary();
113 OnNetworkManagerChanged(network_library); 113 OnNetworkManagerChanged(network_library);
114 network_library->AddNetworkManagerObserver(this); 114 network_library->AddNetworkManagerObserver(this);
115 network_library->AddCellularDataPlanObserver(this); 115 network_library->AddCellularDataPlanObserver(this);
116 const NetworkDevice* cellular = network_library->FindCellularDevice(); 116 const NetworkDevice* cellular = network_library->FindCellularDevice();
117 if (cellular) { 117 if (cellular) {
118 cellular_device_path_ = cellular->device_path(); 118 cellular_device_path_ = cellular->device_path();
119 was_sim_locked_ = cellular->is_sim_locked(); 119 was_sim_locked_ = cellular->is_sim_locked();
120 network_library->AddNetworkDeviceObserver(cellular_device_path_, this); 120 network_library->AddNetworkDeviceObserver(cellular_device_path_, this);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); 447 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1);
448 } 448 }
449 } 449 }
450 450
451 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) { 451 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) {
452 SetTooltipText(label); 452 SetTooltipText(label);
453 SetAccessibleName(label); 453 SetAccessibleName(label);
454 } 454 }
455 455
456 } // namespace chromeos 456 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/network_menu_icon.h » ('j') | chrome/browser/chromeos/status/network_menu_icon.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698