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

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

Issue 8222028: Use WebKit compositor in ui::Layer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase,fixes Created 9 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
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/WebKit/Source/WebKit/chromium/public/WebKit.h"
10 #include "ui/aura/desktop.h" 11 #include "ui/aura/desktop.h"
11 #include "ui/aura_shell/examples/toplevel_window.h" 12 #include "ui/aura_shell/examples/toplevel_window.h"
12 #include "ui/aura_shell/launcher/launcher_types.h" 13 #include "ui/aura_shell/launcher/launcher_types.h"
13 #include "ui/aura_shell/shell.h" 14 #include "ui/aura_shell/shell.h"
14 #include "ui/aura_shell/shell_delegate.h" 15 #include "ui/aura_shell/shell_delegate.h"
15 #include "ui/aura_shell/shell_factory.h" 16 #include "ui/aura_shell/shell_factory.h"
16 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/base/ui_base_paths.h" 18 #include "ui/base/ui_base_paths.h"
19 #include "webkit/glue/webkitplatformsupport_impl.h"
18 20
19 namespace { 21 namespace {
20 22
21 class ShellDelegateImpl : public aura_shell::ShellDelegate { 23 class ShellDelegateImpl : public aura_shell::ShellDelegate {
22 public: 24 public:
23 ShellDelegateImpl() { 25 ShellDelegateImpl() {
24 } 26 }
25 27
26 virtual void CreateNewWindow() OVERRIDE { 28 virtual void CreateNewWindow() OVERRIDE {
27 aura_shell::examples::ToplevelWindow::CreateParams create_params; 29 aura_shell::examples::ToplevelWindow::CreateParams create_params;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // The exit manager is in charge of calling the dtors of singleton objects. 65 // The exit manager is in charge of calling the dtors of singleton objects.
64 base::AtExitManager exit_manager; 66 base::AtExitManager exit_manager;
65 67
66 ui::RegisterPathProvider(); 68 ui::RegisterPathProvider();
67 icu_util::Initialize(); 69 icu_util::Initialize();
68 ResourceBundle::InitSharedInstance("en-US"); 70 ResourceBundle::InitSharedInstance("en-US");
69 71
70 // Create the message-loop here before creating the desktop. 72 // Create the message-loop here before creating the desktop.
71 MessageLoop message_loop(MessageLoop::TYPE_UI); 73 MessageLoop message_loop(MessageLoop::TYPE_UI);
72 74
75 webkit_glue::WebKitPlatformSupportImpl platform_support;
76 WebKit::initialize(&platform_support);
77
73 aura_shell::Shell::GetInstance()->SetDelegate(new ShellDelegateImpl);; 78 aura_shell::Shell::GetInstance()->SetDelegate(new ShellDelegateImpl);;
74 79
75 aura_shell::examples::InitWindowTypeLauncher(); 80 aura_shell::examples::InitWindowTypeLauncher();
76 81
77 aura::Desktop::GetInstance()->Run(); 82 aura::Desktop::GetInstance()->Run();
78 83
79 delete aura::Desktop::GetInstance(); 84 delete aura::Desktop::GetInstance();
80 85
86 WebKit::shutdown();
87
81 return 0; 88 return 0;
82 } 89 }
83 90
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698