| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |