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

Side by Side Diff: ash/shell.cc

Issue 296053009: Makes Env contain a ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: foo Created 6 years, 7 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
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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 display_initialized = true; 836 display_initialized = true;
837 } 837 }
838 #endif // defined(OS_CHROMEOS) 838 #endif // defined(OS_CHROMEOS)
839 if (!display_initialized) 839 if (!display_initialized)
840 display_manager_->InitDefaultDisplay(); 840 display_manager_->InitDefaultDisplay();
841 841
842 // Install the custom factory first so that views::FocusManagers for Tray, 842 // Install the custom factory first so that views::FocusManagers for Tray,
843 // Shelf, and WallPaper could be created by the factory. 843 // Shelf, and WallPaper could be created by the factory.
844 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 844 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
845 845
846 // Env creates the compositor. Historically it seems to have been implicitly
847 // initialized first by the ActivationController, but now that FocusController
848 // no longer does this we need to do it explicitly.
849 aura::Env::CreateInstance(true); 846 aura::Env::CreateInstance(true);
847 aura::Env::GetInstance()->set_context_factory(init_params.context_factory);
850 848
851 // The WindowModalityController needs to be at the front of the input event 849 // The WindowModalityController needs to be at the front of the input event
852 // pretarget handler list to ensure that it processes input events when modal 850 // pretarget handler list to ensure that it processes input events when modal
853 // windows are active. 851 // windows are active.
854 window_modality_controller_.reset( 852 window_modality_controller_.reset(
855 new ::wm::WindowModalityController(this)); 853 new ::wm::WindowModalityController(this));
856 854
857 AddPreTargetHandler(this); 855 AddPreTargetHandler(this);
858 856
859 env_filter_.reset(new ::wm::CompoundEventFilter); 857 env_filter_.reset(new ::wm::CompoundEventFilter);
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 //////////////////////////////////////////////////////////////////////////////// 1141 ////////////////////////////////////////////////////////////////////////////////
1144 // Shell, aura::client::ActivationChangeObserver implementation: 1142 // Shell, aura::client::ActivationChangeObserver implementation:
1145 1143
1146 void Shell::OnWindowActivated(aura::Window* gained_active, 1144 void Shell::OnWindowActivated(aura::Window* gained_active,
1147 aura::Window* lost_active) { 1145 aura::Window* lost_active) {
1148 if (gained_active) 1146 if (gained_active)
1149 target_root_window_ = gained_active->GetRootWindow(); 1147 target_root_window_ = gained_active->GetRootWindow();
1150 } 1148 }
1151 1149
1152 } // namespace ash 1150 } // namespace ash
OLDNEW
« no previous file with comments | « apps/shell/browser/shell_desktop_controller.cc ('k') | ash/shell/content_client/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698