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

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: Rebased no-op 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 | « content/shell/browser/minimal_shell.cc ('k') | ui/aura/demo/demo_main.cc » ('j') | 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 "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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 // The ContextFactory must exist before any Compositors are created. 302 // The ContextFactory must exist before any Compositors are created.
303 bool allow_test_contexts = false; 303 bool allow_test_contexts = false;
304 ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts); 304 ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts);
305 305
306 ui::RegisterPathProvider(); 306 ui::RegisterPathProvider();
307 base::i18n::InitializeICU(); 307 base::i18n::InitializeICU();
308 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 308 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
309 309
310 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); 310 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
311 aura::Env::GetInstance(); 311 aura::Env::CreateInstance();
312 scoped_ptr<aura::TestScreen> test_screen( 312 scoped_ptr<aura::TestScreen> test_screen(
313 aura::TestScreen::CreateFullscreen()); 313 aura::TestScreen::CreateFullscreen());
314 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); 314 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
315 scoped_ptr<aura::RootWindow> root_window( 315 scoped_ptr<aura::RootWindow> root_window(
316 test_screen->CreateRootWindowForPrimaryDisplay()); 316 test_screen->CreateRootWindowForPrimaryDisplay());
317 aura::client::SetCaptureClient( 317 aura::client::SetCaptureClient(
318 root_window.get(), 318 root_window.get(),
319 new aura::client::DefaultCaptureClient(root_window.get())); 319 new aura::client::DefaultCaptureClient(root_window.get()));
320 320
321 scoped_ptr<aura::client::FocusClient> focus_client(new aura::FocusManager); 321 scoped_ptr<aura::client::FocusClient> focus_client(new aura::FocusManager);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); 361 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100));
362 #endif 362 #endif
363 363
364 root_window->ShowRootWindow(); 364 root_window->ShowRootWindow();
365 base::MessageLoopForUI::current()->Run(); 365 base::MessageLoopForUI::current()->Run();
366 focus_client.reset(); 366 focus_client.reset();
367 root_window.reset(); 367 root_window.reset();
368 368
369 return 0; 369 return 0;
370 } 370 }
OLDNEW
« no previous file with comments | « content/shell/browser/minimal_shell.cc ('k') | ui/aura/demo/demo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698