| 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 // Force Layout | 564 // Force Layout |
| 565 root_window_controller->root_window_layout()->OnWindowResized(); | 565 root_window_controller->root_window_layout()->OnWindowResized(); |
| 566 | 566 |
| 567 // It needs to be created after OnWindowResized has been called, otherwise the | 567 // It needs to be created after OnWindowResized has been called, otherwise the |
| 568 // widget will not paint when restoring after a browser crash. Also it needs | 568 // widget will not paint when restoring after a browser crash. Also it needs |
| 569 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 569 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
| 570 // the correct size. | 570 // the correct size. |
| 571 user_wallpaper_delegate_->InitializeWallpaper(); | 571 user_wallpaper_delegate_->InitializeWallpaper(); |
| 572 | 572 |
| 573 if (initially_hide_cursor_) | 573 if (initially_hide_cursor_) |
| 574 cursor_manager_.DisableMouseEvents(); | 574 cursor_manager_.HideCursor(); |
| 575 cursor_manager_.SetCursor(ui::kCursorPointer); | 575 cursor_manager_.SetCursor(ui::kCursorPointer); |
| 576 | 576 |
| 577 // Cursor might have been hidden by somethign other than chrome. | 577 if (!cursor_manager_.IsCursorVisible()) { |
| 578 // Let the first mouse event show the cursor. | 578 // Cursor might have been hidden by something other than chrome. |
| 579 env_filter_->set_cursor_hidden_by_filter(true); | 579 // Let the first mouse event show the cursor. |
| 580 env_filter_->set_cursor_hidden_by_filter(true); |
| 581 } |
| 580 } | 582 } |
| 581 | 583 |
| 582 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { | 584 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { |
| 583 // No context menus if user have not logged in. | 585 // No context menus if user have not logged in. |
| 584 if (!delegate_->IsUserLoggedIn()) | 586 if (!delegate_->IsUserLoggedIn()) |
| 585 return; | 587 return; |
| 586 // No context menus when screen is locked. | 588 // No context menus when screen is locked. |
| 587 if (IsScreenLocked()) | 589 if (IsScreenLocked()) |
| 588 return; | 590 return; |
| 589 | 591 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 //////////////////////////////////////////////////////////////////////////////// | 925 //////////////////////////////////////////////////////////////////////////////// |
| 924 // Shell, aura::client::ActivationChangeObserver implementation: | 926 // Shell, aura::client::ActivationChangeObserver implementation: |
| 925 | 927 |
| 926 void Shell::OnWindowActivated(aura::Window* gained_active, | 928 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 927 aura::Window* lost_active) { | 929 aura::Window* lost_active) { |
| 928 if (gained_active) | 930 if (gained_active) |
| 929 active_root_window_ = gained_active->GetRootWindow(); | 931 active_root_window_ = gained_active->GetRootWindow(); |
| 930 } | 932 } |
| 931 | 933 |
| 932 } // namespace ash | 934 } // namespace ash |
| OLD | NEW |