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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { | 512 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { |
513 aura::Env::GetInstance()->AddPreTargetHandler(filter); | 513 AddPreTargetHandler(filter); |
514 } | 514 } |
515 | 515 |
516 void Shell::RemoveEnvEventFilter(aura::EventFilter* filter) { | 516 void Shell::RemoveEnvEventFilter(aura::EventFilter* filter) { |
517 aura::Env::GetInstance()->RemovePreTargetHandler(filter); | 517 RemovePreTargetHandler(filter); |
518 } | 518 } |
519 | 519 |
520 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { | 520 void Shell::ShowContextMenu(const gfx::Point& location_in_screen) { |
521 // No context menus if user have not logged in. | 521 // No context menus if user have not logged in. |
522 if (!delegate_.get() || !delegate_->IsUserLoggedIn()) | 522 if (!delegate_.get() || !delegate_->IsUserLoggedIn()) |
523 return; | 523 return; |
524 // No context menus when screen is locked. | 524 // No context menus when screen is locked. |
525 if (IsScreenLocked()) | 525 if (IsScreenLocked()) |
526 return; | 526 return; |
527 | 527 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 for (RootWindowControllerList::iterator iter = controllers.begin(); | 795 for (RootWindowControllerList::iterator iter = controllers.begin(); |
796 iter != controllers.end(); ++iter) { | 796 iter != controllers.end(); ++iter) { |
797 if ((*iter)->GetSystemModalLayoutManager(window)-> | 797 if ((*iter)->GetSystemModalLayoutManager(window)-> |
798 CanWindowReceiveEvents(window)) { | 798 CanWindowReceiveEvents(window)) { |
799 return true; | 799 return true; |
800 } | 800 } |
801 } | 801 } |
802 return false; | 802 return false; |
803 } | 803 } |
804 | 804 |
| 805 bool Shell::CanAcceptEvents() { |
| 806 return true; |
| 807 } |
| 808 |
| 809 ui::EventTarget* Shell::GetParentTarget() { |
| 810 return NULL; |
| 811 } |
| 812 |
805 } // namespace ash | 813 } // namespace ash |
OLD | NEW |