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

Side by Side Diff: ash/shell.cc

Issue 306063007: Remove the seemlingly uncecessary AddPreTargetHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months 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 | « no previous file | no next file » | 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/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 855
856 aura::Env::CreateInstance(true); 856 aura::Env::CreateInstance(true);
857 aura::Env::GetInstance()->set_context_factory(init_params.context_factory); 857 aura::Env::GetInstance()->set_context_factory(init_params.context_factory);
858 858
859 // The WindowModalityController needs to be at the front of the input event 859 // The WindowModalityController needs to be at the front of the input event
860 // pretarget handler list to ensure that it processes input events when modal 860 // pretarget handler list to ensure that it processes input events when modal
861 // windows are active. 861 // windows are active.
862 window_modality_controller_.reset( 862 window_modality_controller_.reset(
863 new ::wm::WindowModalityController(this)); 863 new ::wm::WindowModalityController(this));
864 864
865 AddPreTargetHandler(this);
866
867 env_filter_.reset(new ::wm::CompoundEventFilter); 865 env_filter_.reset(new ::wm::CompoundEventFilter);
868 AddPreTargetHandler(env_filter_.get()); 866 AddPreTargetHandler(env_filter_.get());
869 867
870 ::wm::FocusController* focus_controller = 868 ::wm::FocusController* focus_controller =
871 new ::wm::FocusController(new wm::AshFocusRules); 869 new ::wm::FocusController(new wm::AshFocusRules);
872 focus_client_.reset(focus_controller); 870 focus_client_.reset(focus_controller);
873 activation_client_ = focus_controller; 871 activation_client_ = focus_controller;
874 activation_client_->AddObserver(this); 872 activation_client_->AddObserver(this);
875 focus_cycler_.reset(new FocusCycler()); 873 focus_cycler_.reset(new FocusCycler());
876 874
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 //////////////////////////////////////////////////////////////////////////////// 1151 ////////////////////////////////////////////////////////////////////////////////
1154 // Shell, aura::client::ActivationChangeObserver implementation: 1152 // Shell, aura::client::ActivationChangeObserver implementation:
1155 1153
1156 void Shell::OnWindowActivated(aura::Window* gained_active, 1154 void Shell::OnWindowActivated(aura::Window* gained_active,
1157 aura::Window* lost_active) { 1155 aura::Window* lost_active) {
1158 if (gained_active) 1156 if (gained_active)
1159 target_root_window_ = gained_active->GetRootWindow(); 1157 target_root_window_ = gained_active->GetRootWindow();
1160 } 1158 }
1161 1159
1162 } // namespace ash 1160 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698