Chromium Code Reviews| Index: blimp/client/linux/blimp_main.cc |
| diff --git a/blimp/client/linux/blimp_main.cc b/blimp/client/linux/blimp_main.cc |
| index 7167ea5a38bb79c5f349b67a8b66f8011ad04bc0..f0f3bf28bd0ea709ae1191196b5035a26efccf10 100644 |
| --- a/blimp/client/linux/blimp_main.cc |
| +++ b/blimp/client/linux/blimp_main.cc |
| @@ -2,17 +2,18 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include <X11/Xlib.h> |
| + |
| #include <string> |
| #include "base/at_exit.h" |
| #include "base/command_line.h" |
| #include "base/run_loop.h" |
| +#include "base/threading/thread.h" |
| #include "blimp/client/blimp_startup.h" |
| #include "blimp/client/session/blimp_client_session_linux.h" |
| #include "blimp/client/session/navigation_feature.h" |
| -#include <X11/Xlib.h> |
| - |
| namespace { |
| const char kDefaultUrl[] = "https://www.google.com"; |
| const int kDummyTabId = 0; |
| @@ -30,6 +31,15 @@ int main(int argc, const char**argv) { |
| blimp::BlimpClientSessionLinux session; |
| + // Create the IO thread and initiate a connection on it. |
| + base::Thread::Options options; |
| + options.message_loop_type = base::MessageLoop::TYPE_IO; |
| + base::Thread io_thread("BlimpIOThread"); |
| + io_thread.StartWithOptions(options); |
| + io_thread.message_loop()->PostTask( |
|
haibinlu
2015/12/29 00:51:45
it is a little strange to run BlimpClientSession::
Kevin M
2015/12/30 23:08:48
Done. Moved IO thread setup into ClientSession, ca
|
| + FROM_HERE, base::Bind(&blimp::BlimpClientSession::Connect, |
| + base::Unretained(&session))); |
| + |
| // If there is a non-switch argument to the command line, load that url. |
| base::CommandLine::StringVector args = |
| base::CommandLine::ForCurrentProcess()->GetArgs(); |