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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 AddShellObserver(session_state_controller_.get()); | 502 AddShellObserver(session_state_controller_.get()); |
503 | 503 |
504 if (initially_hide_cursor_) | 504 if (initially_hide_cursor_) |
505 cursor_manager_.ShowCursor(false); | 505 cursor_manager_.ShowCursor(false); |
506 | 506 |
507 // Cursor might have been hidden by somethign other than chrome. | 507 // Cursor might have been hidden by somethign other than chrome. |
508 // Let the first mouse event show the cursor. | 508 // Let the first mouse event show the cursor. |
509 env_filter_->set_cursor_hidden_by_filter(true); | 509 env_filter_->set_cursor_hidden_by_filter(true); |
510 } | 510 } |
511 | 511 |
| 512 bool Shell::CanAcceptEvents() { |
| 513 return true; |
| 514 } |
| 515 |
| 516 ui::EventTarget* Shell::GetParentTarget() { |
| 517 return NULL; |
| 518 } |
| 519 |
512 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { | 520 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { |
513 aura::Env::GetInstance()->AddPreTargetHandler(filter); | 521 AddPreTargetHandler(filter); |
514 } | 522 } |
515 | 523 |
516 void Shell::RemoveEnvEventFilter(aura::EventFilter* filter) { | 524 void Shell::RemoveEnvEventFilter(aura::EventFilter* filter) { |
517 aura::Env::GetInstance()->RemovePreTargetHandler(filter); | 525 RemovePreTargetHandler(filter); |
518 } | 526 } |
519 | 527 |
520 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { | 528 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { |
521 // No context menus if user have not logged in. | 529 // No context menus if user have not logged in. |
522 if (!delegate_.get() || !delegate_->IsUserLoggedIn()) | 530 if (!delegate_.get() || !delegate_->IsUserLoggedIn()) |
523 return; | 531 return; |
524 // No context menus when screen is locked. | 532 // No context menus when screen is locked. |
525 if (IsScreenLocked()) | 533 if (IsScreenLocked()) |
526 return; | 534 return; |
527 | 535 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 iter != controllers.end(); ++iter) { | 804 iter != controllers.end(); ++iter) { |
797 if ((*iter)->GetSystemModalLayoutManager(window)-> | 805 if ((*iter)->GetSystemModalLayoutManager(window)-> |
798 CanWindowReceiveEvents(window)) { | 806 CanWindowReceiveEvents(window)) { |
799 return true; | 807 return true; |
800 } | 808 } |
801 } | 809 } |
802 return false; | 810 return false; |
803 } | 811 } |
804 | 812 |
805 } // namespace ash | 813 } // namespace ash |
OLD | NEW |