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

Unified Diff: blimp/client/linux/blimp_main.cc

Issue 1551683002: [Blimp Client] Land CL 1528243002 (Add a basic linux client for Blimp) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/client/linux/blimp_display_manager.cc ('k') | blimp/client/session/blimp_client_session_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+}
« no previous file with comments | « blimp/client/linux/blimp_display_manager.cc ('k') | blimp/client/session/blimp_client_session_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698