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

Side by Side Diff: athena/main/athena_shell.cc

Issue 302473005: athena: Add a minimal executable for just the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 6 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 | « athena/main/athena_main.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "athena/test/athena_test_helper.h"
6 #include "base/at_exit.h"
7 #include "base/command_line.h"
8 #include "base/i18n/icu_util.h"
9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h"
11 #include "ui/aura/window_tree_host.h"
12 #include "ui/compositor/test/context_factories_for_test.h"
13 #include "ui/gl/gl_surface.h"
14
15 class UIShell {
16 public:
17 explicit UIShell(base::MessageLoopForUI* message_loop)
18 : athena_helper_(message_loop) {
19 const bool enable_pixel_output = true;
20 ui::ContextFactory* factory =
21 ui::InitializeContextFactoryForTests(enable_pixel_output);
22 athena_helper_.SetUp(factory);
23 athena_helper_.host()->Show();
24 }
25
26 private:
27 athena::test::AthenaTestHelper athena_helper_;
28
29 DISALLOW_COPY_AND_ASSIGN(UIShell);
30 };
31
32 int main(int argc, const char **argv) {
33 setlocale(LC_ALL, "");
34
35 base::AtExitManager exit_manager;
36 base::CommandLine::Init(argc, argv);
37 base::i18n::InitializeICU();
38 gfx::GLSurface::InitializeOneOffForTests();
39
40 base::MessageLoopForUI message_loop;
41 UIShell shell(&message_loop);
42 base::RunLoop run_loop;
43 run_loop.Run();
44 }
OLDNEW
« no previous file with comments | « athena/main/athena_main.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698