OLD | NEW |
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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <queue> | 8 #include <queue> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 menu_model_adapter_ = base::MakeUnique<views::MenuModelAdapter>( | 700 menu_model_adapter_ = base::MakeUnique<views::MenuModelAdapter>( |
701 menu_model_.get(), | 701 menu_model_.get(), |
702 base::Bind(&RootWindowController::OnMenuClosed, base::Unretained(this))); | 702 base::Bind(&RootWindowController::OnMenuClosed, base::Unretained(this))); |
703 | 703 |
704 // The wallpaper controller may not be set yet if the user clicked on the | 704 // The wallpaper controller may not be set yet if the user clicked on the |
705 // status area before the initial animation completion. See crbug.com/222218 | 705 // status area before the initial animation completion. See crbug.com/222218 |
706 if (!wallpaper_widget_controller()) | 706 if (!wallpaper_widget_controller()) |
707 return; | 707 return; |
708 | 708 |
709 menu_runner_ = base::MakeUnique<views::MenuRunner>( | 709 menu_runner_ = base::MakeUnique<views::MenuRunner>( |
710 menu_model_adapter_->CreateMenu(), | 710 menu_model_adapter_->CreateMenu(), views::MenuRunner::CONTEXT_MENU); |
711 views::MenuRunner::CONTEXT_MENU | views::MenuRunner::ASYNC); | 711 menu_runner_->RunMenuAt(wallpaper_widget_controller()->widget(), nullptr, |
712 ignore_result( | 712 gfx::Rect(location_in_screen, gfx::Size()), |
713 menu_runner_->RunMenuAt(wallpaper_widget_controller()->widget(), nullptr, | 713 views::MENU_ANCHOR_TOPLEFT, source_type); |
714 gfx::Rect(location_in_screen, gfx::Size()), | |
715 views::MENU_ANCHOR_TOPLEFT, source_type)); | |
716 } | 714 } |
717 | 715 |
718 void RootWindowController::UpdateAfterLoginStatusChange(LoginStatus status) { | 716 void RootWindowController::UpdateAfterLoginStatusChange(LoginStatus status) { |
719 StatusAreaWidget* status_area_widget = | 717 StatusAreaWidget* status_area_widget = |
720 wm_shelf_->shelf_widget()->status_area_widget(); | 718 wm_shelf_->shelf_widget()->status_area_widget(); |
721 if (status_area_widget) | 719 if (status_area_widget) |
722 status_area_widget->UpdateAfterLoginStatusChange(status); | 720 status_area_widget->UpdateAfterLoginStatusChange(status); |
723 } | 721 } |
724 | 722 |
725 //////////////////////////////////////////////////////////////////////////////// | 723 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 EnableTouchHudProjection(); | 1105 EnableTouchHudProjection(); |
1108 else | 1106 else |
1109 DisableTouchHudProjection(); | 1107 DisableTouchHudProjection(); |
1110 } | 1108 } |
1111 | 1109 |
1112 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1110 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
1113 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1111 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
1114 } | 1112 } |
1115 | 1113 |
1116 } // namespace ash | 1114 } // namespace ash |
OLD | NEW |