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

Side by Side Diff: ash/root_window_controller.cc

Issue 331993009: MacViews: Run native Cocoa context menus to support Services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add VIEWS_EXPORT for unit test access Created 6 years, 5 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 | « no previous file | ash/shelf/shelf_view.cc » ('j') | ui/views/controls/menu/menu_runner.h » ('J')
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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | ui/views/controls/menu/menu_runner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698