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

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

Issue 2901273003: chromeos: Remove TrayBubbleView::Delegate::OnBeforeBubbleWidgetInit (Closed)
Patch Set: nit 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
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.h » ('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/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 init_params->delegate = tray_;
200 // Place the bubble on same display as this system tray.
201 init_params->parent_window = tray_->GetBubbleWindowContainer();
202 init_params->anchor_view = anchor;
203 bubble_view_ = new TrayBubbleView(*init_params);
200 UpdateBottomPadding(); 204 UpdateBottomPadding();
201 bubble_view_->set_adjust_if_offscreen(false); 205 bubble_view_->set_adjust_if_offscreen(false);
202 CreateItemViews(login_status); 206 CreateItemViews(login_status);
203 207
204 if (bubble_view_->CanActivate()) { 208 if (bubble_view_->CanActivate()) {
205 bubble_view_->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 209 bubble_view_->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
206 } 210 }
207 } 211 }
208 212
209 void SystemTrayBubble::FocusDefaultIfNeeded() { 213 void SystemTrayBubble::FocusDefaultIfNeeded() {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 334 }
331 } 335 }
332 336
333 if (focus_view) { 337 if (focus_view) {
334 tray_->ActivateBubble(); 338 tray_->ActivateBubble();
335 focus_view->RequestFocus(); 339 focus_view->RequestFocus();
336 } 340 }
337 } 341 }
338 342
339 } // namespace ash 343 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698