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

Side by Side Diff: ash/shell.cc

Issue 11888003: Differentiate invisible cursor mode and disabled mouse events mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/wm/session_state_controller_impl.cc » ('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/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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // Force Layout 575 // Force Layout
576 root_window_controller->root_window_layout()->OnWindowResized(); 576 root_window_controller->root_window_layout()->OnWindowResized();
577 577
578 // It needs to be created after OnWindowResized has been called, otherwise the 578 // It needs to be created after OnWindowResized has been called, otherwise the
579 // widget will not paint when restoring after a browser crash. Also it needs 579 // widget will not paint when restoring after a browser crash. Also it needs
580 // to be created after InitSecondaryDisplays() to initialize the wallpapers in 580 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
581 // the correct size. 581 // the correct size.
582 user_wallpaper_delegate_->InitializeWallpaper(); 582 user_wallpaper_delegate_->InitializeWallpaper();
583 583
584 if (initially_hide_cursor_) 584 if (initially_hide_cursor_)
585 cursor_manager_.DisableMouseEvents(); 585 cursor_manager_.HideCursor();
586 cursor_manager_.SetCursor(ui::kCursorPointer); 586 cursor_manager_.SetCursor(ui::kCursorPointer);
587 587
588 // Cursor might have been hidden by somethign other than chrome. 588 if (!cursor_manager_.IsCursorVisible()) {
589 // Let the first mouse event show the cursor. 589 // Cursor might have been hidden by something other than chrome.
590 env_filter_->set_cursor_hidden_by_filter(true); 590 // Let the first mouse event show the cursor.
591 env_filter_->set_cursor_hidden_by_filter(true);
592 }
591 } 593 }
592 594
593 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { 595 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) {
594 // No context menus if user have not logged in. 596 // No context menus if user have not logged in.
595 if (!delegate_->IsUserLoggedIn()) 597 if (!delegate_->IsUserLoggedIn())
596 return; 598 return;
597 // No context menus when screen is locked. 599 // No context menus when screen is locked.
598 if (IsScreenLocked()) 600 if (IsScreenLocked())
599 return; 601 return;
600 602
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 //////////////////////////////////////////////////////////////////////////////// 938 ////////////////////////////////////////////////////////////////////////////////
937 // Shell, aura::client::ActivationChangeObserver implementation: 939 // Shell, aura::client::ActivationChangeObserver implementation:
938 940
939 void Shell::OnWindowActivated(aura::Window* gained_active, 941 void Shell::OnWindowActivated(aura::Window* gained_active,
940 aura::Window* lost_active) { 942 aura::Window* lost_active) {
941 if (gained_active) 943 if (gained_active)
942 active_root_window_ = gained_active->GetRootWindow(); 944 active_root_window_ = gained_active->GetRootWindow();
943 } 945 }
944 946
945 } // namespace ash 947 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/session_state_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698