OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 int main(int argc, const char**argv) { | 27 int main(int argc, const char**argv) { |
28 base::AtExitManager at_exit; | 28 base::AtExitManager at_exit; |
29 base::CommandLine::Init(argc, argv); | 29 base::CommandLine::Init(argc, argv); |
30 | 30 |
31 CHECK(gfx::InitializeThreadedX11()); | 31 CHECK(gfx::InitializeThreadedX11()); |
32 | 32 |
33 blimp::client::InitializeLogging(); | 33 blimp::client::InitializeLogging(); |
34 blimp::client::InitializeMainMessageLoop(); | 34 blimp::client::InitializeMainMessageLoop(); |
| 35 blimp::client::InitializeResourceBundle(); |
35 | 36 |
36 base::Thread io_thread("BlimpIOThread"); | 37 base::Thread io_thread("BlimpIOThread"); |
37 base::Thread::Options options; | 38 base::Thread::Options options; |
38 options.message_loop_type = base::MessageLoop::TYPE_IO; | 39 options.message_loop_type = base::MessageLoop::TYPE_IO; |
39 io_thread.StartWithOptions(options); | 40 io_thread.StartWithOptions(options); |
40 | 41 |
41 // Creating this using "new" and passing to context using "WrapUnique" as | 42 // Creating this using "new" and passing to context using "WrapUnique" as |
42 // opposed to "MakeUnique" because we'll need to pass the compositor | 43 // opposed to "MakeUnique" because we'll need to pass the compositor |
43 // dependencies to the display manager as well. | 44 // dependencies to the display manager as well. |
44 blimp::client::CompositorDependencies* compositor_dependencies = | 45 blimp::client::CompositorDependencies* compositor_dependencies = |
(...skipping 22 matching lines...) Expand all Loading... |
67 std::unique_ptr<blimp::client::BlimpDisplayManagerDelegate> | 68 std::unique_ptr<blimp::client::BlimpDisplayManagerDelegate> |
68 display_manager_delegate = | 69 display_manager_delegate = |
69 base::MakeUnique<blimp::client::BlimpDisplayManagerDelegateMain>(); | 70 base::MakeUnique<blimp::client::BlimpDisplayManagerDelegateMain>(); |
70 blimp::client::BlimpDisplayManager display_manager( | 71 blimp::client::BlimpDisplayManager display_manager( |
71 display_manager_delegate.get(), compositor_dependencies); | 72 display_manager_delegate.get(), compositor_dependencies); |
72 display_manager.SetWindowSize(gfx::Size(kWindowWidth, kWindowHeight)); | 73 display_manager.SetWindowSize(gfx::Size(kWindowWidth, kWindowHeight)); |
73 display_manager.SetBlimpContents(std::move(contents)); | 74 display_manager.SetBlimpContents(std::move(contents)); |
74 | 75 |
75 base::RunLoop().Run(); | 76 base::RunLoop().Run(); |
76 } | 77 } |
OLD | NEW |