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

Side by Side Diff: ash/system/tray/system_tray_bubble.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
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/tray/system_tray_bubble.h" 5 #include "ash/system/tray/system_tray_bubble.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/system/tray/system_tray_item.h" 10 #include "ash/system/tray/system_tray_item.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 init_params->max_height = kDetailedBubbleMaxHeight; 257 init_params->max_height = kDetailedBubbleMaxHeight;
258 } else if (bubble_type_ == BUBBLE_TYPE_NOTIFICATION) { 258 } else if (bubble_type_ == BUBBLE_TYPE_NOTIFICATION) {
259 init_params->close_on_deactivate = false; 259 init_params->close_on_deactivate = false;
260 } 260 }
261 bubble_view_ = TrayBubbleView::Create( 261 bubble_view_ = TrayBubbleView::Create(
262 tray_->GetBubbleWindowContainer(), anchor, tray_, init_params); 262 tray_->GetBubbleWindowContainer(), anchor, tray_, init_params);
263 bubble_view_->set_adjust_if_offscreen(false); 263 bubble_view_->set_adjust_if_offscreen(false);
264 CreateItemViews(login_status); 264 CreateItemViews(login_status);
265 265
266 if (bubble_view_->CanActivate()) { 266 if (bubble_view_->CanActivate()) {
267 bubble_view_->GetWidget()->NotifyAccessibilityEvent( 267 bubble_view_->NotifyAccessibilityEvent(
268 bubble_view_, ui::AccessibilityTypes::EVENT_ALERT, true); 268 ui::AccessibilityTypes::EVENT_ALERT, true);
269 } 269 }
270 } 270 }
271 271
272 void SystemTrayBubble::DestroyItemViews() { 272 void SystemTrayBubble::DestroyItemViews() {
273 for (std::vector<ash::SystemTrayItem*>::iterator it = items_.begin(); 273 for (std::vector<ash::SystemTrayItem*>::iterator it = items_.begin();
274 it != items_.end(); 274 it != items_.end();
275 ++it) { 275 ++it) {
276 switch (bubble_type_) { 276 switch (bubble_type_) {
277 case BUBBLE_TYPE_DEFAULT: 277 case BUBBLE_TYPE_DEFAULT:
278 (*it)->DestroyDefaultView(); 278 (*it)->DestroyDefaultView();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // For default view, draw bottom border for each item, except the last 362 // For default view, draw bottom border for each item, except the last
363 // 2 items, which are the bottom header row and the one just above it. 363 // 2 items, which are the bottom header row and the one just above it.
364 bubble_view_->AddChildView(new TrayPopupItemContainer( 364 bubble_view_->AddChildView(new TrayPopupItemContainer(
365 item_views[i], is_default_bubble, 365 item_views[i], is_default_bubble,
366 is_default_bubble && (i < item_views.size() - 2))); 366 is_default_bubble && (i < item_views.size() - 2)));
367 } 367 }
368 } 368 }
369 369
370 } // namespace internal 370 } // namespace internal
371 } // namespace ash 371 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/tray_network.cc ('k') | chrome/browser/ui/views/critical_notification_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698