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 <queue> | 7 #include <queue> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 Shell::GetInstance()->delegate()->CreateContextMenu( | 623 Shell::GetInstance()->delegate()->CreateContextMenu( |
624 GetRootWindow(), NULL, NULL)); | 624 GetRootWindow(), NULL, NULL)); |
625 if (!menu_model) | 625 if (!menu_model) |
626 return; | 626 return; |
627 | 627 |
628 // Background controller may not be set yet if user clicked on status are | 628 // Background controller may not be set yet if user clicked on status are |
629 // before initial animation completion. See crbug.com/222218 | 629 // before initial animation completion. See crbug.com/222218 |
630 if (!wallpaper_controller_.get()) | 630 if (!wallpaper_controller_.get()) |
631 return; | 631 return; |
632 | 632 |
633 views::MenuRunner menu_runner(menu_model.get()); | 633 views::MenuRunner menu_runner(menu_model.get(), |
| 634 views::MenuRunner::CONTEXT_MENU); |
634 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), | 635 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), |
635 NULL, | 636 NULL, |
636 gfx::Rect(location_in_screen, gfx::Size()), | 637 gfx::Rect(location_in_screen, gfx::Size()), |
637 views::MENU_ANCHOR_TOPLEFT, | 638 views::MENU_ANCHOR_TOPLEFT, |
638 source_type, | 639 source_type) == views::MenuRunner::MENU_DELETED) { |
639 views::MenuRunner::CONTEXT_MENU) == | |
640 views::MenuRunner::MENU_DELETED) { | |
641 return; | 640 return; |
642 } | 641 } |
643 | 642 |
644 Shell::GetInstance()->UpdateShelfVisibility(); | 643 Shell::GetInstance()->UpdateShelfVisibility(); |
645 } | 644 } |
646 | 645 |
647 void RootWindowController::UpdateShelfVisibility() { | 646 void RootWindowController::UpdateShelfVisibility() { |
648 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 647 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
649 } | 648 } |
650 | 649 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 else | 1110 else |
1112 DisableTouchHudProjection(); | 1111 DisableTouchHudProjection(); |
1113 } | 1112 } |
1114 | 1113 |
1115 RootWindowController* GetRootWindowController( | 1114 RootWindowController* GetRootWindowController( |
1116 const aura::Window* root_window) { | 1115 const aura::Window* root_window) { |
1117 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1116 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1118 } | 1117 } |
1119 | 1118 |
1120 } // namespace ash | 1119 } // namespace ash |
OLD | NEW |