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

Side by Side Diff: ash/shell.cc

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chrome_frame_net_tests Created 7 years, 2 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 | ash/test/ash_test_helper.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // Install the custom factory first so that views::FocusManagers for Tray, 465 // Install the custom factory first so that views::FocusManagers for Tray,
466 // Launcher, and WallPaper could be created by the factory. 466 // Launcher, and WallPaper could be created by the factory.
467 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 467 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
468 468
469 env_filter_.reset(new views::corewm::CompoundEventFilter); 469 env_filter_.reset(new views::corewm::CompoundEventFilter);
470 AddPreTargetHandler(env_filter_.get()); 470 AddPreTargetHandler(env_filter_.get());
471 471
472 // Env creates the compositor. Historically it seems to have been implicitly 472 // Env creates the compositor. Historically it seems to have been implicitly
473 // initialized first by the ActivationController, but now that FocusController 473 // initialized first by the ActivationController, but now that FocusController
474 // no longer does this we need to do it explicitly. 474 // no longer does this we need to do it explicitly.
475 aura::Env::GetInstance(); 475 aura::Env::CreateInstance();
476 views::corewm::FocusController* focus_controller = 476 views::corewm::FocusController* focus_controller =
477 new views::corewm::FocusController(new wm::AshFocusRules); 477 new views::corewm::FocusController(new wm::AshFocusRules);
478 focus_client_.reset(focus_controller); 478 focus_client_.reset(focus_controller);
479 activation_client_ = focus_controller; 479 activation_client_ = focus_controller;
480 activation_client_->AddObserver(this); 480 activation_client_->AddObserver(this);
481 focus_cycler_.reset(new internal::FocusCycler()); 481 focus_cycler_.reset(new internal::FocusCycler());
482 482
483 screen_position_controller_.reset(new internal::ScreenPositionController); 483 screen_position_controller_.reset(new internal::ScreenPositionController);
484 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory()); 484 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
485 485
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 //////////////////////////////////////////////////////////////////////////////// 963 ////////////////////////////////////////////////////////////////////////////////
964 // Shell, aura::client::ActivationChangeObserver implementation: 964 // Shell, aura::client::ActivationChangeObserver implementation:
965 965
966 void Shell::OnWindowActivated(aura::Window* gained_active, 966 void Shell::OnWindowActivated(aura::Window* gained_active,
967 aura::Window* lost_active) { 967 aura::Window* lost_active) {
968 if (gained_active) 968 if (gained_active)
969 target_root_window_ = gained_active->GetRootWindow(); 969 target_root_window_ = gained_active->GetRootWindow();
970 } 970 }
971 971
972 } // namespace ash 972 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/test/ash_test_helper.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698