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

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: rebase 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
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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // Force Layout 556 // Force Layout
557 root_window_controller->root_window_layout()->OnWindowResized(); 557 root_window_controller->root_window_layout()->OnWindowResized();
558 558
559 // It needs to be created after OnWindowResized has been called, otherwise the 559 // It needs to be created after OnWindowResized has been called, otherwise the
560 // widget will not paint when restoring after a browser crash. Also it needs 560 // widget will not paint when restoring after a browser crash. Also it needs
561 // to be created after InitSecondaryDisplays() to initialize the wallpapers in 561 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
562 // the correct size. 562 // the correct size.
563 user_wallpaper_delegate_->InitializeWallpaper(); 563 user_wallpaper_delegate_->InitializeWallpaper();
564 564
565 if (initially_hide_cursor_) 565 if (initially_hide_cursor_)
566 cursor_manager_.ShowCursor(false); 566 cursor_manager_.EnableCursor(false);
567 cursor_manager_.SetCursor(ui::kCursorPointer); 567 cursor_manager_.SetCursor(ui::kCursorPointer);
568 568
569 // Cursor might have been hidden by somethign other than chrome. 569 // Cursor might have been hidden by somethign other than chrome.
570 // Let the first mouse event show the cursor. 570 // Let the first mouse event show the cursor.
571 env_filter_->set_cursor_hidden_by_filter(true); 571 env_filter_->set_cursor_hidden_by_filter(true);
572 } 572 }
573 573
574 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { 574 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) {
575 // No context menus if user have not logged in. 575 // No context menus if user have not logged in.
576 if (!delegate_->IsUserLoggedIn()) 576 if (!delegate_->IsUserLoggedIn())
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 //////////////////////////////////////////////////////////////////////////////// 898 ////////////////////////////////////////////////////////////////////////////////
899 // Shell, aura::client::ActivationChangeObserver implementation: 899 // Shell, aura::client::ActivationChangeObserver implementation:
900 900
901 void Shell::OnWindowActivated(aura::Window* gained_active, 901 void Shell::OnWindowActivated(aura::Window* gained_active,
902 aura::Window* lost_active) { 902 aura::Window* lost_active) {
903 if (gained_active) 903 if (gained_active)
904 active_root_window_ = gained_active->GetRootWindow(); 904 active_root_window_ = gained_active->GetRootWindow();
905 } 905 }
906 906
907 } // namespace ash 907 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698