OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <deque> | 5 #include <deque> |
6 #include <iomanip> | 6 #include <iomanip> |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "examples/media_test/keystroke.h" | 10 #include "examples/media_test/keystroke.h" |
(...skipping 52 matching lines...) Loading... |
63 << std::endl | 63 << std::endl |
64 << std::endl | 64 << std::endl |
65 << std::endl | 65 << std::endl |
66 << kUp << std::flush; | 66 << kUp << std::flush; |
67 } | 67 } |
68 | 68 |
69 CreateNewMediaTest(); | 69 CreateNewMediaTest(); |
70 Poll(); | 70 Poll(); |
71 } | 71 } |
72 | 72 |
73 bool ConfigureIncomingConnection( | |
74 mojo::ApplicationConnection* connection) override { | |
75 return true; | |
76 } | |
77 | |
78 private: | 73 private: |
79 static const char* kHome; | 74 static const char* kHome; |
80 static const char* kClearLine; | 75 static const char* kClearLine; |
81 static const char* kUp; | 76 static const char* kUp; |
82 static constexpr double ns_per_second = 1000000000.0; | 77 static constexpr double ns_per_second = 1000000000.0; |
83 | 78 |
84 // Processes arguments. | 79 // Processes arguments. |
85 void ProcessArgs(const std::vector<std::string>& args) { | 80 void ProcessArgs(const std::vector<std::string>& args) { |
86 for (size_t i = 1; i < args.size(); ++i) { | 81 for (size_t i = 1; i < args.size(); ++i) { |
87 const std::string& arg = args[i]; | 82 const std::string& arg = args[i]; |
(...skipping 234 matching lines...) Loading... |
322 | 317 |
323 } // namespace examples | 318 } // namespace examples |
324 } // namespace media | 319 } // namespace media |
325 } // namespace mojo | 320 } // namespace mojo |
326 | 321 |
327 MojoResult MojoMain(MojoHandle application_request) { | 322 MojoResult MojoMain(MojoHandle application_request) { |
328 mojo::ApplicationRunnerChromium runner( | 323 mojo::ApplicationRunnerChromium runner( |
329 new mojo::media::examples::MediaTestApp); | 324 new mojo::media::examples::MediaTestApp); |
330 return runner.Run(application_request); | 325 return runner.Run(application_request); |
331 } | 326 } |
OLD | NEW |