1 // Copyright 2018 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 "components/exo/wayland/clients/fullscreen_shell.h"
6 
7 #include "base/at_exit.h"
8 #include "base/command_line.h"
9 #include "base/message_loop/message_pump_type.h"
10 #include "base/task/single_thread_task_executor.h"
11 
main(int argc,char * argv[])12 int main(int argc, char* argv[]) {
13   base::AtExitManager exit_manager;
14   base::CommandLine::Init(argc, argv);
15   base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
16   exo::wayland::clients::FullscreenClient::InitParams params;
17 
18   params.allocate_buffers_with_output_mode = true;
19   params.use_fullscreen_shell = true;
20   params.use_touch = true;
21 
22   if (!params.FromCommandLine(*command_line))
23     return 1;
24 
25   base::SingleThreadTaskExecutor main_task_executor(base::MessagePumpType::UI);
26   exo::wayland::clients::FullscreenClient client;
27 
28   if (!client.Init(params))
29     return 1;
30 
31   if (!client.Run(params))
32     return 1;
33 
34   return 0;
35 }
36