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

Side by Side Diff: ash/shell.cc

Issue 14756019: Adding new user menu section to the SystemTrayMenu & refactoring of user access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 7 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
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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 if (!cursor_manager_.IsCursorVisible()) { 610 if (!cursor_manager_.IsCursorVisible()) {
611 // Cursor might have been hidden by something other than chrome. 611 // Cursor might have been hidden by something other than chrome.
612 // Let the first mouse event show the cursor. 612 // Let the first mouse event show the cursor.
613 env_filter_->set_cursor_hidden_by_filter(true); 613 env_filter_->set_cursor_hidden_by_filter(true);
614 } 614 }
615 } 615 }
616 616
617 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { 617 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) {
618 // No context menus if there is no session with an active user. 618 // No context menus if there is no session with an active user.
619 if (!session_state_delegate_->HasActiveUser()) 619 if (!session_state_delegate_->NumberOfLoggedInUsers())
620 return; 620 return;
621 // No context menus when screen is locked. 621 // No context menus when screen is locked.
622 if (session_state_delegate_->IsScreenLocked()) 622 if (session_state_delegate_->IsScreenLocked())
623 return; 623 return;
624 624
625 aura::RootWindow* root = 625 aura::RootWindow* root =
626 wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size())); 626 wm::GetRootWindowMatching(gfx::Rect(location_in_screen, gfx::Size()));
627 // TODO(oshima): The root and root window controller shouldn't be 627 // TODO(oshima): The root and root window controller shouldn't be
628 // NULL even for the out-of-bounds |location_in_screen| (It should 628 // NULL even for the out-of-bounds |location_in_screen| (It should
629 // return the primary root). Investigate why/how this is 629 // return the primary root). Investigate why/how this is
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 //////////////////////////////////////////////////////////////////////////////// 947 ////////////////////////////////////////////////////////////////////////////////
948 // Shell, aura::client::ActivationChangeObserver implementation: 948 // Shell, aura::client::ActivationChangeObserver implementation:
949 949
950 void Shell::OnWindowActivated(aura::Window* gained_active, 950 void Shell::OnWindowActivated(aura::Window* gained_active,
951 aura::Window* lost_active) { 951 aura::Window* lost_active) {
952 if (gained_active) 952 if (gained_active)
953 active_root_window_ = gained_active->GetRootWindow(); 953 active_root_window_ = gained_active->GetRootWindow();
954 } 954 }
955 955
956 } // namespace ash 956 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698