0

fix Screen leak in ash tests

valgrind memory fyi here: http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20OS%20%28valgrind%29%284%29/builds/14345/steps/memory%20test%3A%20unit/logs/stdio

TBR=ben@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11146011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161829 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
scottmg@chromium.org
2012-10-15 06:31:02 +00:00
parent b0ff83de88
commit 0493979497
2 changed files with 4 additions and 4 deletions

@ -185,8 +185,8 @@ Shell::Shell(ShellDelegate* delegate)
new internal::OutputConfiguratorAnimation()),
#endif // defined(OS_CHROMEOS)
browser_context_(NULL) {
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_);
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get());
ui_controls::InstallUIControlsAura(internal::CreateUIControls());
#if defined(OS_CHROMEOS)
output_configurator_->AddObserver(output_configurator_animation_.get());

@ -314,7 +314,7 @@ class ASH_EXPORT Shell : internal::SystemModalContainerEventFilterDelegate{
// TODO(oshima): Remove methods that are moved to RootWindowController.
Launcher* launcher();
const ScreenAsh* screen() { return screen_; }
const ScreenAsh* screen() { return screen_.get(); }
// Force the shelf to query for it's current visibility state.
void UpdateShelfVisibility();
@ -411,7 +411,7 @@ class ASH_EXPORT Shell : internal::SystemModalContainerEventFilterDelegate{
// when the screen is initially created.
static bool initially_hide_cursor_;
ScreenAsh* screen_;
scoped_ptr<ScreenAsh> screen_;
// Active root window. Never becomes NULL during the session.
aura::RootWindow* active_root_window_;