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

Side by Side Diff: ui/aura/demo/demo_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/command_line.h" 6 #include "base/command_line.h"
7 #include "base/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 aura::RootWindow* root_window_; 103 aura::RootWindow* root_window_;
104 104
105 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_; 105 scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(DemoStackingClient); 107 DISALLOW_COPY_AND_ASSIGN(DemoStackingClient);
108 }; 108 };
109 109
110 int DemoMain() { 110 int DemoMain() {
111 // Create the message-loop here before creating the root window. 111 // Create the message-loop here before creating the root window.
112 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); 112 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI);
113 aura::Env::GetInstance(); 113 aura::Env::CreateInstance();
114 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); 114 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create());
115 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); 115 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
116 scoped_ptr<aura::RootWindow> root_window( 116 scoped_ptr<aura::RootWindow> root_window(
117 test_screen->CreateRootWindowForPrimaryDisplay()); 117 test_screen->CreateRootWindowForPrimaryDisplay());
118 scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient( 118 scoped_ptr<DemoStackingClient> stacking_client(new DemoStackingClient(
119 root_window.get())); 119 root_window.get()));
120 aura::FocusManager focus_manager; 120 aura::FocusManager focus_manager;
121 aura::client::SetFocusClient(root_window.get(), &focus_manager); 121 aura::client::SetFocusClient(root_window.get(), &focus_manager);
122 122
123 // Create a hierarchy of test windows. 123 // Create a hierarchy of test windows.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 // The exit manager is in charge of calling the dtors of singleton objects. 159 // The exit manager is in charge of calling the dtors of singleton objects.
160 base::AtExitManager exit_manager; 160 base::AtExitManager exit_manager;
161 161
162 ui::RegisterPathProvider(); 162 ui::RegisterPathProvider();
163 base::i18n::InitializeICU(); 163 base::i18n::InitializeICU();
164 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 164 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
165 165
166 return DemoMain(); 166 return DemoMain();
167 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698