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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 if (!menu_model) | 562 if (!menu_model) |
563 return; | 563 return; |
564 | 564 |
565 // Background controller may not be set yet if user clicked on status are | 565 // Background controller may not be set yet if user clicked on status are |
566 // before initial animation completion. See crbug.com/222218 | 566 // before initial animation completion. See crbug.com/222218 |
567 if (!wallpaper_controller_.get()) | 567 if (!wallpaper_controller_.get()) |
568 return; | 568 return; |
569 | 569 |
570 views::MenuRunner menu_runner(menu_model.get()); | 570 views::MenuRunner menu_runner(menu_model.get()); |
571 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), | 571 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), |
572 NULL, gfx::Rect(location_in_screen, gfx::Size()), | 572 NULL, |
573 views::MenuItemView::TOPLEFT, source_type, | 573 gfx::Rect(location_in_screen, gfx::Size()), |
574 views::MenuRunner::CONTEXT_MENU) == | 574 views::MENU_ANCHOR_TOPLEFT, |
| 575 source_type, |
| 576 views::MenuRunner::CONTEXT_MENU) == |
575 views::MenuRunner::MENU_DELETED) { | 577 views::MenuRunner::MENU_DELETED) { |
576 return; | 578 return; |
577 } | 579 } |
578 | 580 |
579 Shell::GetInstance()->UpdateShelfVisibility(); | 581 Shell::GetInstance()->UpdateShelfVisibility(); |
580 } | 582 } |
581 | 583 |
582 void RootWindowController::UpdateShelfVisibility() { | 584 void RootWindowController::UpdateShelfVisibility() { |
583 shelf_->shelf_layout_manager()->UpdateVisibilityState(); | 585 shelf_->shelf_layout_manager()->UpdateVisibilityState(); |
584 } | 586 } |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 else | 1032 else |
1031 DisableTouchHudProjection(); | 1033 DisableTouchHudProjection(); |
1032 } | 1034 } |
1033 | 1035 |
1034 RootWindowController* GetRootWindowController( | 1036 RootWindowController* GetRootWindowController( |
1035 const aura::Window* root_window) { | 1037 const aura::Window* root_window) { |
1036 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1038 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1037 } | 1039 } |
1038 | 1040 |
1039 } // namespace ash | 1041 } // namespace ash |
OLD | NEW |