Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(828)

Side by Side Diff: blimp/client/linux/blimp_main.cc

Issue 1528243002: Add a basic linux client for Blimp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: X11, how does it work? Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 <string>
6
7 #include "base/at_exit.h"
8 #include "base/command_line.h"
9 #include "base/run_loop.h"
10 #include "blimp/client/blimp_startup.h"
11 #include "blimp/client/session/blimp_client_session_linux.h"
12 #include "blimp/client/session/navigation_feature.h"
13
14 #include <X11/Xlib.h>
15
16 namespace {
17 const char kDefaultUrl[] = "https://www.google.com";
18 const int kDummyTabId = 0;
19 }
20
21 int main(int argc, const char**argv) {
22 base::AtExitManager at_exit;
23
24 base::CommandLine::Init(argc, argv);
25
26 XInitThreads();
27
28 blimp::InitializeLogging();
29 blimp::InitializeMainMessageLoop();
30
31 blimp::BlimpClientSessionLinux session;
32
33 // If there is a non-switch argument to the command line, load that url.
34 base::CommandLine::StringVector args =
35 base::CommandLine::ForCurrentProcess()->GetArgs();
36 std::string url = args.size() > 0 ? args[0] : kDefaultUrl;
37
38 session.GetNavigationFeature()->NavigateToUrlText(kDummyTabId, url);
39
40 base::RunLoop().Run();
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698