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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 // We assume in throughout the code that this will not return NULL. If code | 528 // We assume in throughout the code that this will not return NULL. If code |
529 // triggers this for valid reasons, it should test status_area_widget first. | 529 // triggers this for valid reasons, it should test status_area_widget first. |
530 CHECK(shelf_->status_area_widget()); | 530 CHECK(shelf_->status_area_widget()); |
531 return shelf_->status_area_widget()->system_tray(); | 531 return shelf_->status_area_widget()->system_tray(); |
532 } | 532 } |
533 | 533 |
534 void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen, | 534 void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen, |
535 ui::MenuSourceType source_type) { | 535 ui::MenuSourceType source_type) { |
536 DCHECK(Shell::GetInstance()->delegate()); | 536 DCHECK(Shell::GetInstance()->delegate()); |
537 scoped_ptr<ui::MenuModel> menu_model( | 537 scoped_ptr<ui::MenuModel> menu_model( |
538 Shell::GetInstance()->delegate()->CreateContextMenu(root_window())); | 538 Shell::GetInstance()->delegate()->CreateContextMenu(root_window(), |
| 539 NULL, |
| 540 NULL)); |
539 if (!menu_model) | 541 if (!menu_model) |
540 return; | 542 return; |
541 | 543 |
542 // Background controller may not be set yet if user clicked on status are | 544 // Background controller may not be set yet if user clicked on status are |
543 // before initial animation completion. See crbug.com/222218 | 545 // before initial animation completion. See crbug.com/222218 |
544 if (!wallpaper_controller_.get()) | 546 if (!wallpaper_controller_.get()) |
545 return; | 547 return; |
546 | 548 |
547 views::MenuRunner menu_runner(menu_model.get()); | 549 views::MenuRunner menu_runner(menu_model.get()); |
548 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), | 550 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 DisableTouchHudProjection(); | 977 DisableTouchHudProjection(); |
976 } | 978 } |
977 | 979 |
978 RootWindowController* GetRootWindowController( | 980 RootWindowController* GetRootWindowController( |
979 const aura::Window* root_window) { | 981 const aura::Window* root_window) { |
980 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 982 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
981 } | 983 } |
982 | 984 |
983 } // namespace internal | 985 } // namespace internal |
984 } // namespace ash | 986 } // namespace ash |
OLD | NEW |