| Index: blimp/client/linux/blimp_main.cc
|
| diff --git a/blimp/client/linux/blimp_main.cc b/blimp/client/linux/blimp_main.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2d9552124ae1d529bb64a8b136a258eae845b019
|
| --- /dev/null
|
| +++ b/blimp/client/linux/blimp_main.cc
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// 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 "blimp/client/blimp_startup.h"
|
| +#include "blimp/client/session/blimp_client_session_linux.h"
|
| +#include "blimp/client/session/navigation_feature.h"
|
| +
|
| +namespace {
|
| +const char kDefaultUrl[] = "https://www.google.com";
|
| +const int kDummyTabId = 0;
|
| +}
|
| +
|
| +int main(int argc, const char**argv) {
|
| + base::AtExitManager at_exit;
|
| +
|
| + base::CommandLine::Init(argc, argv);
|
| +
|
| + XInitThreads();
|
| +
|
| + blimp::InitializeLogging();
|
| + blimp::InitializeMainMessageLoop();
|
| +
|
| + blimp::BlimpClientSessionLinux session;
|
| +
|
| + // If there is a non-switch argument to the command line, load that url.
|
| + base::CommandLine::StringVector args =
|
| + base::CommandLine::ForCurrentProcess()->GetArgs();
|
| + std::string url = args.size() > 0 ? args[0] : kDefaultUrl;
|
| +
|
| + session.GetNavigationFeature()->NavigateToUrlText(kDummyTabId, url);
|
| +
|
| + base::RunLoop().Run();
|
| +}
|
|
|