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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 // Force Layout | 579 // Force Layout |
580 root_window_controller->root_window_layout()->OnWindowResized(); | 580 root_window_controller->root_window_layout()->OnWindowResized(); |
581 | 581 |
582 // It needs to be created after OnWindowResized has been called, otherwise the | 582 // It needs to be created after OnWindowResized has been called, otherwise the |
583 // widget will not paint when restoring after a browser crash. Also it needs | 583 // widget will not paint when restoring after a browser crash. Also it needs |
584 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 584 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
585 // the correct size. | 585 // the correct size. |
586 user_wallpaper_delegate_->InitializeWallpaper(); | 586 user_wallpaper_delegate_->InitializeWallpaper(); |
587 | 587 |
588 if (initially_hide_cursor_) | 588 if (initially_hide_cursor_) |
589 cursor_manager_.ShowCursor(false); | 589 cursor_manager_.EnableCursor(false); |
590 cursor_manager_.SetCursor(ui::kCursorPointer); | 590 cursor_manager_.SetCursor(ui::kCursorPointer); |
591 | 591 |
592 // Cursor might have been hidden by somethign other than chrome. | 592 // Cursor might have been hidden by somethign other than chrome. |
593 // Let the first mouse event show the cursor. | 593 // Let the first mouse event show the cursor. |
594 env_filter_->set_cursor_hidden_by_filter(true); | 594 env_filter_->set_cursor_hidden_by_filter(true); |
595 } | 595 } |
596 | 596 |
597 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { | 597 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { |
598 // No context menus if user have not logged in. | 598 // No context menus if user have not logged in. |
599 if (!delegate_->IsUserLoggedIn()) | 599 if (!delegate_->IsUserLoggedIn()) |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 | 902 |
903 void Shell::OnEvent(ui::Event* event) { | 903 void Shell::OnEvent(ui::Event* event) { |
904 if (event->type() == | 904 if (event->type() == |
905 views::corewm::FocusChangeEvent::activation_changed_event_type()) { | 905 views::corewm::FocusChangeEvent::activation_changed_event_type()) { |
906 active_root_window_ = | 906 active_root_window_ = |
907 static_cast<aura::Window*>(event->target())->GetRootWindow(); | 907 static_cast<aura::Window*>(event->target())->GetRootWindow(); |
908 } | 908 } |
909 } | 909 } |
910 | 910 |
911 } // namespace ash | 911 } // namespace ash |
OLD | NEW |