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

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

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 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 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/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
11 #include "ash/common/wm/wm_lookup.h" 11 #include "ash/common/wm_lookup.h"
12 #include "ash/common/wm/wm_root_window_controller.h" 12 #include "ash/common/wm_root_window_controller.h"
13 #include "ash/common/wm/wm_window.h" 13 #include "ash/common/wm_window.h"
14 #include "ash/multi_profile_uma.h" 14 #include "ash/multi_profile_uma.h"
15 #include "ash/popup_message.h" 15 #include "ash/popup_message.h"
16 #include "ash/session/session_state_delegate.h" 16 #include "ash/session/session_state_delegate.h"
17 #include "ash/shell.h" 17 #include "ash/shell.h"
18 #include "ash/shell_delegate.h" 18 #include "ash/shell_delegate.h"
19 #include "ash/system/tray/system_tray.h" 19 #include "ash/system/tray/system_tray.h"
20 #include "ash/system/tray/system_tray_delegate.h" 20 #include "ash/system/tray/system_tray_delegate.h"
21 #include "ash/system/tray/tray_popup_label_button.h" 21 #include "ash/system/tray/tray_popup_label_button.h"
22 #include "ash/system/tray/tray_popup_label_button_border.h" 22 #include "ash/system/tray/tray_popup_label_button_border.h"
23 #include "ash/system/user/button_from_view.h" 23 #include "ash/system/user/button_from_view.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // gets destroyed.. 429 // gets destroyed..
430 add_menu_option_.reset(new views::Widget); 430 add_menu_option_.reset(new views::Widget);
431 views::Widget::InitParams params; 431 views::Widget::InitParams params;
432 params.type = views::Widget::InitParams::TYPE_TOOLTIP; 432 params.type = views::Widget::InitParams::TYPE_TOOLTIP;
433 params.keep_on_top = true; 433 params.keep_on_top = true;
434 params.accept_events = true; 434 params.accept_events = true;
435 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 435 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
436 params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE; 436 params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE;
437 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 437 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
438 params.name = "AddUserMenuOption"; 438 params.name = "AddUserMenuOption";
439 wm::WmLookup::Get() 439 WmLookup::Get()
440 ->GetWindowForWidget(GetWidget()) 440 ->GetWindowForWidget(GetWidget())
441 ->GetRootWindowController() 441 ->GetRootWindowController()
442 ->ConfigureWidgetInitParamsForContainer( 442 ->ConfigureWidgetInitParamsForContainer(
443 add_menu_option_.get(), kShellWindowId_DragImageAndTooltipContainer, 443 add_menu_option_.get(), kShellWindowId_DragImageAndTooltipContainer,
444 &params); 444 &params);
445 add_menu_option_->Init(params); 445 add_menu_option_->Init(params);
446 add_menu_option_->SetOpacity(1.f); 446 add_menu_option_->SetOpacity(1.f);
447 447
448 // Position it below our user card. 448 // Position it below our user card.
449 gfx::Rect bounds = user_card_view_->GetBoundsInScreen(); 449 gfx::Rect bounds = user_card_view_->GetBoundsInScreen();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 focus_manager_ = NULL; 525 focus_manager_ = NULL;
526 if (user_card_view_->GetFocusManager()) 526 if (user_card_view_->GetFocusManager())
527 user_card_view_->GetFocusManager()->ClearFocus(); 527 user_card_view_->GetFocusManager()->ClearFocus();
528 popup_message_.reset(); 528 popup_message_.reset();
529 mouse_watcher_.reset(); 529 mouse_watcher_.reset();
530 add_menu_option_.reset(); 530 add_menu_option_.reset();
531 } 531 }
532 532
533 } // namespace tray 533 } // namespace tray
534 } // namespace ash 534 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698