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

Side by Side Diff: ash/system/tray/system_tray_bubble.cc

Issue 2901273003: chromeos: Remove TrayBubbleView::Delegate::OnBeforeBubbleWidgetInit (Closed)
Patch Set: cleanup Created 3 years, 6 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 "ash/system/tray/system_tray_bubble.h" 5 #include "ash/system/tray/system_tray_bubble.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/session/session_controller.h" 10 #include "ash/session/session_controller.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 LoginStatus login_status, 189 LoginStatus login_status,
190 TrayBubbleView::InitParams* init_params) { 190 TrayBubbleView::InitParams* init_params) {
191 DCHECK(anchor); 191 DCHECK(anchor);
192 DCHECK(!bubble_view_); 192 DCHECK(!bubble_view_);
193 193
194 if (bubble_type_ == BUBBLE_TYPE_DETAILED && 194 if (bubble_type_ == BUBBLE_TYPE_DETAILED &&
195 init_params->max_height < GetDetailedBubbleMaxHeight()) { 195 init_params->max_height < GetDetailedBubbleMaxHeight()) {
196 init_params->max_height = GetDetailedBubbleMaxHeight(); 196 init_params->max_height = GetDetailedBubbleMaxHeight();
197 } 197 }
198 198
199 bubble_view_ = TrayBubbleView::Create(anchor, tray_, init_params); 199 // Place the bubble on same display as this system tray.
200 bubble_view_ = new TrayBubbleView(tray_->GetBubbleWindowContainer(), anchor,
201 tray_, *init_params);
200 UpdateBottomPadding(); 202 UpdateBottomPadding();
201 bubble_view_->set_adjust_if_offscreen(false); 203 bubble_view_->set_adjust_if_offscreen(false);
202 CreateItemViews(login_status); 204 CreateItemViews(login_status);
203 205
204 if (bubble_view_->CanActivate()) { 206 if (bubble_view_->CanActivate()) {
205 bubble_view_->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 207 bubble_view_->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
206 } 208 }
207 } 209 }
208 210
209 void SystemTrayBubble::FocusDefaultIfNeeded() { 211 void SystemTrayBubble::FocusDefaultIfNeeded() {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 332 }
331 } 333 }
332 334
333 if (focus_view) { 335 if (focus_view) {
334 tray_->ActivateBubble(); 336 tray_->ActivateBubble();
335 focus_view->RequestFocus(); 337 focus_view->RequestFocus();
336 } 338 }
337 } 339 }
338 340
339 } // namespace ash 341 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698