OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <X11/Xlib.h> |
| 6 #include <string> |
| 7 |
| 8 #include "base/at_exit.h" |
| 9 #include "base/command_line.h" |
| 10 #include "base/run_loop.h" |
| 11 #include "blimp/client/blimp_startup.h" |
| 12 #include "blimp/client/session/blimp_client_session_linux.h" |
| 13 #include "blimp/client/session/navigation_feature.h" |
| 14 |
| 15 namespace { |
| 16 const char kDefaultUrl[] = "https://www.google.com"; |
| 17 const int kDummyTabId = 0; |
| 18 } |
| 19 |
| 20 int main(int argc, const char**argv) { |
| 21 base::AtExitManager at_exit; |
| 22 |
| 23 base::CommandLine::Init(argc, argv); |
| 24 |
| 25 XInitThreads(); |
| 26 |
| 27 blimp::InitializeLogging(); |
| 28 blimp::InitializeMainMessageLoop(); |
| 29 |
| 30 blimp::BlimpClientSessionLinux session; |
| 31 |
| 32 // If there is a non-switch argument to the command line, load that url. |
| 33 base::CommandLine::StringVector args = |
| 34 base::CommandLine::ForCurrentProcess()->GetArgs(); |
| 35 std::string url = args.size() > 0 ? args[0] : kDefaultUrl; |
| 36 |
| 37 session.GetNavigationFeature()->NavigateToUrlText(kDummyTabId, url); |
| 38 |
| 39 base::RunLoop().Run(); |
| 40 } |
OLD | NEW |