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

Side by Side Diff: ash/system/chromeos/network/tray_network.cc

Issue 13524005: Cleanup: remove NotifyAccessibilityEvent from views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/system/chromeos/network/tray_network.h" 5 #include "ash/system/chromeos/network/tray_network.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/chromeos/network/network_icon_animation.h" 9 #include "ash/system/chromeos/network/network_icon_animation.h"
10 #include "ash/system/chromeos/network/network_list_detailed_view.h" 10 #include "ash/system/chromeos/network/network_list_detailed_view.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 private: 170 private:
171 // Updates connection status and notifies accessibility event when necessary. 171 // Updates connection status and notifies accessibility event when necessary.
172 void UpdateConnectionStatus(const string16& network_name, bool connected) { 172 void UpdateConnectionStatus(const string16& network_name, bool connected) {
173 string16 new_connection_status_string; 173 string16 new_connection_status_string;
174 if (connected) { 174 if (connected) {
175 new_connection_status_string = l10n_util::GetStringFUTF16( 175 new_connection_status_string = l10n_util::GetStringFUTF16(
176 IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED, network_name); 176 IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED, network_name);
177 } 177 }
178 if (new_connection_status_string != connection_status_string_) { 178 if (new_connection_status_string != connection_status_string_) {
179 connection_status_string_ = new_connection_status_string; 179 connection_status_string_ = new_connection_status_string;
180 if(!connection_status_string_.empty()) { 180 if(!connection_status_string_.empty())
181 GetWidget()->NotifyAccessibilityEvent( 181 NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_ALERT, true);
182 this, ui::AccessibilityTypes::EVENT_ALERT, true);
183 }
184 } 182 }
185 } 183 }
186 184
187 void UpdateIcon(bool tray_icon_visible, const gfx::ImageSkia& image) { 185 void UpdateIcon(bool tray_icon_visible, const gfx::ImageSkia& image) {
188 image_view_->SetImage(image); 186 image_view_->SetImage(image);
189 SetVisible(tray_icon_visible); 187 SetVisible(tray_icon_visible);
190 SchedulePaint(); 188 SchedulePaint();
191 } 189 }
192 190
193 TrayNetwork* network_tray_; 191 TrayNetwork* network_tray_;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 619
622 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) { 620 void TrayNetwork::LinkClicked(MessageType message_type, int link_id) {
623 tray::NetworkMessages::MessageMap::const_iterator iter = 621 tray::NetworkMessages::MessageMap::const_iterator iter =
624 messages()->messages().find(message_type); 622 messages()->messages().find(message_type);
625 if (iter != messages()->messages().end() && iter->second.delegate) 623 if (iter != messages()->messages().end() && iter->second.delegate)
626 iter->second.delegate->NotificationLinkClicked(message_type, link_id); 624 iter->second.delegate->NotificationLinkClicked(message_type, link_id);
627 } 625 }
628 626
629 } // namespace internal 627 } // namespace internal
630 } // namespace ash 628 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698