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

Side by Side Diff: ash/system/user/user_view.cc

Issue 2888013002: chromeos: Remove some WmWindow usage from ash/system (Closed)
Patch Set: header Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/user/user_view.h" 5 #include "ash/system/user/user_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // item since it will destroyed automatically before the menu / user menu item 317 // item since it will destroyed automatically before the menu / user menu item
318 // gets destroyed.. 318 // gets destroyed..
319 user_dropdown_widget_.reset(new views::Widget); 319 user_dropdown_widget_.reset(new views::Widget);
320 views::Widget::InitParams params; 320 views::Widget::InitParams params;
321 params.type = views::Widget::InitParams::TYPE_MENU; 321 params.type = views::Widget::InitParams::TYPE_MENU;
322 params.keep_on_top = true; 322 params.keep_on_top = true;
323 params.accept_events = true; 323 params.accept_events = true;
324 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 324 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
325 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 325 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
326 params.name = "AddUserMenuOption"; 326 params.name = "AddUserMenuOption";
327 WmWindow::Get(GetWidget()->GetNativeWindow()) 327 RootWindowController::ForWindow(GetWidget()->GetNativeWindow())
328 ->GetRootWindowController()
329 ->ConfigureWidgetInitParamsForContainer( 328 ->ConfigureWidgetInitParamsForContainer(
330 user_dropdown_widget_.get(), 329 user_dropdown_widget_.get(),
331 kShellWindowId_DragImageAndTooltipContainer, &params); 330 kShellWindowId_DragImageAndTooltipContainer, &params);
332 user_dropdown_widget_->Init(params); 331 user_dropdown_widget_->Init(params);
333 332
334 const SessionController* const session_controller = 333 const SessionController* const session_controller =
335 Shell::Get()->session_controller(); 334 Shell::Get()->session_controller();
336 const AddUserSessionPolicy add_user_policy = 335 const AddUserSessionPolicy add_user_policy =
337 session_controller->GetAddUserPolicy(); 336 session_controller->GetAddUserPolicy();
338 add_user_enabled_ = add_user_policy == AddUserSessionPolicy::ALLOWED; 337 add_user_enabled_ = add_user_policy == AddUserSessionPolicy::ALLOWED;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 focus_manager_->RemoveFocusChangeListener(this); 415 focus_manager_->RemoveFocusChangeListener(this);
417 focus_manager_ = nullptr; 416 focus_manager_ = nullptr;
418 if (user_card_container_->GetFocusManager()) 417 if (user_card_container_->GetFocusManager())
419 user_card_container_->GetFocusManager()->ClearFocus(); 418 user_card_container_->GetFocusManager()->ClearFocus();
420 user_card_view_->SetSuppressCaptureIcon(false); 419 user_card_view_->SetSuppressCaptureIcon(false);
421 user_dropdown_widget_.reset(); 420 user_dropdown_widget_.reset();
422 } 421 }
423 422
424 } // namespace tray 423 } // namespace tray
425 } // namespace ash 424 } // namespace ash
OLDNEW
« ash/system/audio/tray_audio.cc ('K') | « ash/system/tray/tray_background_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698