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

Side by Side Diff: ui/aura/bench/bench_main.cc

Issue 23882007: Explicit initialization of aura::Env for browser shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary call Created 7 years, 3 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int main(int argc, char** argv) { 298 int main(int argc, char** argv) {
299 CommandLine::Init(argc, argv); 299 CommandLine::Init(argc, argv);
300 300
301 base::AtExitManager exit_manager; 301 base::AtExitManager exit_manager;
302 302
303 ui::RegisterPathProvider(); 303 ui::RegisterPathProvider();
304 base::i18n::InitializeICU(); 304 base::i18n::InitializeICU();
305 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 305 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
306 306
307 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); 307 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
308 aura::Env::GetInstance(); 308 aura::Env::CreateInstance();
309 scoped_ptr<aura::TestScreen> test_screen( 309 scoped_ptr<aura::TestScreen> test_screen(
310 aura::TestScreen::CreateFullscreen()); 310 aura::TestScreen::CreateFullscreen());
311 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); 311 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
312 scoped_ptr<aura::RootWindow> root_window( 312 scoped_ptr<aura::RootWindow> root_window(
313 test_screen->CreateRootWindowForPrimaryDisplay()); 313 test_screen->CreateRootWindowForPrimaryDisplay());
314 aura::client::SetCaptureClient( 314 aura::client::SetCaptureClient(
315 root_window.get(), 315 root_window.get(),
316 new aura::client::DefaultCaptureClient(root_window.get())); 316 new aura::client::DefaultCaptureClient(root_window.get()));
317 317
318 scoped_ptr<aura::client::FocusClient> focus_client(new aura::FocusManager); 318 scoped_ptr<aura::client::FocusClient> focus_client(new aura::FocusManager);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); 358 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100));
359 #endif 359 #endif
360 360
361 root_window->ShowRootWindow(); 361 root_window->ShowRootWindow();
362 base::MessageLoopForUI::current()->Run(); 362 base::MessageLoopForUI::current()->Run();
363 focus_client.reset(); 363 focus_client.reset();
364 root_window.reset(); 364 root_window.reset();
365 365
366 return 0; 366 return 0;
367 } 367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698