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

Side by Side Diff: ash/shell.cc

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 years 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/magnifier/magnification_controller.cc ('k') | ash/test/ash_test_base.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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // Force Layout 557 // Force Layout
558 root_window_controller->root_window_layout()->OnWindowResized(); 558 root_window_controller->root_window_layout()->OnWindowResized();
559 559
560 // It needs to be created after OnWindowResized has been called, otherwise the 560 // It needs to be created after OnWindowResized has been called, otherwise the
561 // widget will not paint when restoring after a browser crash. Also it needs 561 // widget will not paint when restoring after a browser crash. Also it needs
562 // to be created after InitSecondaryDisplays() to initialize the wallpapers in 562 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
563 // the correct size. 563 // the correct size.
564 user_wallpaper_delegate_->InitializeWallpaper(); 564 user_wallpaper_delegate_->InitializeWallpaper();
565 565
566 if (initially_hide_cursor_) 566 if (initially_hide_cursor_)
567 cursor_manager_.ShowCursor(false); 567 cursor_manager_.DisableMouseEvents();
568 cursor_manager_.SetCursor(ui::kCursorPointer); 568 cursor_manager_.SetCursor(ui::kCursorPointer);
569 569
570 // Cursor might have been hidden by somethign other than chrome. 570 // Cursor might have been hidden by somethign other than chrome.
571 // Let the first mouse event show the cursor. 571 // Let the first mouse event show the cursor.
572 env_filter_->set_cursor_hidden_by_filter(true); 572 env_filter_->set_cursor_hidden_by_filter(true);
573 } 573 }
574 574
575 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { 575 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) {
576 // No context menus if user have not logged in. 576 // No context menus if user have not logged in.
577 if (!delegate_->IsUserLoggedIn()) 577 if (!delegate_->IsUserLoggedIn())
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 //////////////////////////////////////////////////////////////////////////////// 916 ////////////////////////////////////////////////////////////////////////////////
917 // Shell, aura::client::ActivationChangeObserver implementation: 917 // Shell, aura::client::ActivationChangeObserver implementation:
918 918
919 void Shell::OnWindowActivated(aura::Window* gained_active, 919 void Shell::OnWindowActivated(aura::Window* gained_active,
920 aura::Window* lost_active) { 920 aura::Window* lost_active) {
921 if (gained_active) 921 if (gained_active)
922 active_root_window_ = gained_active->GetRootWindow(); 922 active_root_window_ = gained_active->GetRootWindow();
923 } 923 }
924 924
925 } // namespace ash 925 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698