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

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

Issue 7890054: Adds code for a new Aura shell. (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
« no previous file with comments | « ui/aura_shell/aura_shell.gyp ('k') | ui/aura_shell/desktop_background_view.h » ('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) 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 "third_party/skia/include/core/SkXfermode.h"
11 #include "ui/aura/desktop.h" 10 #include "ui/aura/desktop.h"
12 #include "ui/aura/desktop_host.h" 11 #include "ui/aura_shell/desktop_layout_manager.h"
13 #include "ui/aura/window.h" 12 #include "ui/aura_shell/shell_factory.h"
14 #include "ui/aura/window_delegate.h"
15 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/base/ui_base_paths.h" 14 #include "ui/base/ui_base_paths.h"
17 #include "ui/gfx/canvas.h"
18 #include "ui/gfx/canvas_skia.h"
19 #include "ui/gfx/rect.h"
20 #include "views/widget/widget.h"
21 #include "views/widget/widget_delegate.h"
22 15
23 #if !defined(OS_WIN) 16 namespace {
24 #include "ui/aura/hit_test.h" 17
25 #endif 18 void InitDesktopWindow() {
19 aura::Window* desktop_window = aura::Desktop::GetInstance()->window();
20 DesktopLayoutManager* desktop_layout =
21 new DesktopLayoutManager(desktop_window);
22 desktop_window->SetLayoutManager(desktop_layout);
23
24 desktop_layout->set_background_widget(CreateDesktopBackground());
25 desktop_layout->set_launcher_widget(CreateLauncher());
26 }
27
28 }
26 29
27 int main(int argc, char** argv) { 30 int main(int argc, char** argv) {
28 CommandLine::Init(argc, argv); 31 CommandLine::Init(argc, argv);
29 32
30 // The exit manager is in charge of calling the dtors of singleton objects. 33 // The exit manager is in charge of calling the dtors of singleton objects.
31 base::AtExitManager exit_manager; 34 base::AtExitManager exit_manager;
32 35
33 ui::RegisterPathProvider(); 36 ui::RegisterPathProvider();
34 icu_util::Initialize(); 37 icu_util::Initialize();
35 ResourceBundle::InitSharedInstance("en-US"); 38 ResourceBundle::InitSharedInstance("en-US");
36 39
37 #if defined(USE_X11) 40 #if defined(USE_X11)
38 base::MessagePumpX::DisableGtkMessagePump(); 41 base::MessagePumpX::DisableGtkMessagePump();
39 #endif 42 #endif
40 43
41 // Create the message-loop here before creating the desktop. 44 // Create the message-loop here before creating the desktop.
42 MessageLoop message_loop(MessageLoop::TYPE_UI); 45 MessageLoop message_loop(MessageLoop::TYPE_UI);
43 46
47 InitDesktopWindow();
48
44 aura::Desktop::GetInstance()->Run(); 49 aura::Desktop::GetInstance()->Run();
45 50
46 delete aura::Desktop::GetInstance(); 51 delete aura::Desktop::GetInstance();
47 52
48 return 0; 53 return 0;
49 } 54 }
50 55
OLDNEW
« no previous file with comments | « ui/aura_shell/aura_shell.gyp ('k') | ui/aura_shell/desktop_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698