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

Side by Side Diff: ash/shell.cc

Issue 11146011: fix Screen leak in ash tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « ash/shell.h ('k') | 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/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 Shell::Shell(ShellDelegate* delegate) 178 Shell::Shell(ShellDelegate* delegate)
179 : screen_(new ScreenAsh), 179 : screen_(new ScreenAsh),
180 active_root_window_(NULL), 180 active_root_window_(NULL),
181 delegate_(delegate), 181 delegate_(delegate),
182 #if defined(OS_CHROMEOS) 182 #if defined(OS_CHROMEOS)
183 output_configurator_(new chromeos::OutputConfigurator()), 183 output_configurator_(new chromeos::OutputConfigurator()),
184 output_configurator_animation_( 184 output_configurator_animation_(
185 new internal::OutputConfiguratorAnimation()), 185 new internal::OutputConfiguratorAnimation()),
186 #endif // defined(OS_CHROMEOS) 186 #endif // defined(OS_CHROMEOS)
187 browser_context_(NULL) { 187 browser_context_(NULL) {
188 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); 188 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
189 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); 189 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get());
190 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 190 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
191 #if defined(OS_CHROMEOS) 191 #if defined(OS_CHROMEOS)
192 output_configurator_->AddObserver(output_configurator_animation_.get()); 192 output_configurator_->AddObserver(output_configurator_animation_.get());
193 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 193 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
194 output_configurator()); 194 output_configurator());
195 #endif // defined(OS_CHROMEOS) 195 #endif // defined(OS_CHROMEOS)
196 } 196 }
197 197
198 Shell::~Shell() { 198 Shell::~Shell() {
199 views::FocusManagerFactory::Install(NULL); 199 views::FocusManagerFactory::Install(NULL);
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 iter != controllers.end(); ++iter) { 748 iter != controllers.end(); ++iter) {
749 if ((*iter)->GetSystemModalLayoutManager(window)-> 749 if ((*iter)->GetSystemModalLayoutManager(window)->
750 CanWindowReceiveEvents(window)) { 750 CanWindowReceiveEvents(window)) {
751 return true; 751 return true;
752 } 752 }
753 } 753 }
754 return false; 754 return false;
755 } 755 }
756 756
757 } // namespace ash 757 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698