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

Side by Side Diff: ash/root_window_controller.cc

Issue 107163005: [ash] Add TYPE_DIALOG and its item's LauncherContextMenu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ash/launcher/launcher_types.h ('k') | ash/shelf/app_list_shelf_item_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 // We assume in throughout the code that this will not return NULL. If code 534 // We assume in throughout the code that this will not return NULL. If code
535 // triggers this for valid reasons, it should test status_area_widget first. 535 // triggers this for valid reasons, it should test status_area_widget first.
536 CHECK(shelf_->status_area_widget()); 536 CHECK(shelf_->status_area_widget());
537 return shelf_->status_area_widget()->system_tray(); 537 return shelf_->status_area_widget()->system_tray();
538 } 538 }
539 539
540 void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen, 540 void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen,
541 ui::MenuSourceType source_type) { 541 ui::MenuSourceType source_type) {
542 DCHECK(Shell::GetInstance()->delegate()); 542 DCHECK(Shell::GetInstance()->delegate());
543 scoped_ptr<ui::MenuModel> menu_model( 543 scoped_ptr<ui::MenuModel> menu_model(
544 Shell::GetInstance()->delegate()->CreateContextMenu(root_window())); 544 Shell::GetInstance()->delegate()->CreateContextMenu(root_window(),
545 NULL,
546 NULL));
545 if (!menu_model) 547 if (!menu_model)
546 return; 548 return;
547 549
548 // Background controller may not be set yet if user clicked on status are 550 // Background controller may not be set yet if user clicked on status are
549 // before initial animation completion. See crbug.com/222218 551 // before initial animation completion. See crbug.com/222218
550 if (!wallpaper_controller_.get()) 552 if (!wallpaper_controller_.get())
551 return; 553 return;
552 554
553 views::MenuRunner menu_runner(menu_model.get()); 555 views::MenuRunner menu_runner(menu_model.get());
554 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(), 556 if (menu_runner.RunMenuAt(wallpaper_controller_->widget(),
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 DisableTouchHudProjection(); 983 DisableTouchHudProjection();
982 } 984 }
983 985
984 RootWindowController* GetRootWindowController( 986 RootWindowController* GetRootWindowController(
985 const aura::Window* root_window) { 987 const aura::Window* root_window) {
986 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 988 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
987 } 989 }
988 990
989 } // namespace internal 991 } // namespace internal
990 } // namespace ash 992 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_types.h ('k') | ash/shelf/app_list_shelf_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698