Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(756)

Side by Side Diff: ash/shell.cc

Issue 11314013: Register a separate default ui::EventTarget for Aura (Ash) to ensure that it does not interfere wit… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shell.h ('k') | ash/wm/event_client_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/event_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698