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

Side by Side Diff: ui/aura_shell/aura_shell_main.cc

Issue 7970001: Better Z-index support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 9 #include "base/message_loop.h"
10 #include "ui/aura/desktop.h" 10 #include "ui/aura/desktop.h"
11 #include "ui/aura_shell/desktop_layout_manager.h"
12 #include "ui/aura_shell/shell_factory.h" 11 #include "ui/aura_shell/shell_factory.h"
13 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/base/ui_base_paths.h" 13 #include "ui/base/ui_base_paths.h"
15 14
16 namespace aura_shell {
17 namespace internal {
18
19 void InitDesktopWindow() {
20 aura::Window* desktop_window = aura::Desktop::GetInstance()->window();
21 DesktopLayoutManager* desktop_layout =
22 new DesktopLayoutManager(desktop_window);
23 desktop_window->SetLayoutManager(desktop_layout);
24
25 desktop_layout->set_background_widget(CreateDesktopBackground());
26 desktop_layout->set_launcher_widget(CreateLauncher());
27 desktop_layout->set_status_area_widget(CreateStatusArea());
28 }
29
30 } // namespace internal
31 } // namespace aura_shell
32
33 int main(int argc, char** argv) { 15 int main(int argc, char** argv) {
34 CommandLine::Init(argc, argv); 16 CommandLine::Init(argc, argv);
35 17
36 // The exit manager is in charge of calling the dtors of singleton objects. 18 // The exit manager is in charge of calling the dtors of singleton objects.
37 base::AtExitManager exit_manager; 19 base::AtExitManager exit_manager;
38 20
39 ui::RegisterPathProvider(); 21 ui::RegisterPathProvider();
40 icu_util::Initialize(); 22 icu_util::Initialize();
41 ResourceBundle::InitSharedInstance("en-US"); 23 ResourceBundle::InitSharedInstance("en-US");
42 24
43 #if defined(USE_X11) 25 #if defined(USE_X11)
44 base::MessagePumpX::DisableGtkMessagePump(); 26 base::MessagePumpX::DisableGtkMessagePump();
45 #endif 27 #endif
46 28
47 // Create the message-loop here before creating the desktop. 29 // Create the message-loop here before creating the desktop.
48 MessageLoop message_loop(MessageLoop::TYPE_UI); 30 MessageLoop message_loop(MessageLoop::TYPE_UI);
49 31
50 aura_shell::internal::InitDesktopWindow(); 32 aura_shell::InitDesktopWindow();
51 33
52 aura::Desktop::GetInstance()->Run(); 34 aura::Desktop::GetInstance()->Run();
53 35
54 delete aura::Desktop::GetInstance(); 36 delete aura::Desktop::GetInstance();
55 37
56 return 0; 38 return 0;
57 } 39 }
58 40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698