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

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

Issue 1551583003: Implementation and fixes for Blimp client/engine E2E communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dtrainor-linux-cl1528243002
Patch Set: Addressed haibin's feedback, made an ObserverList for ConnectionErrorObserver Created 4 years, 11 months 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <X11/Xlib.h> 5 #include <X11/Xlib.h>
6
6 #include <string> 7 #include <string>
7 8
8 #include "base/at_exit.h" 9 #include "base/at_exit.h"
9 #include "base/command_line.h" 10 #include "base/command_line.h"
10 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/threading/thread.h"
11 #include "blimp/client/blimp_startup.h" 13 #include "blimp/client/blimp_startup.h"
12 #include "blimp/client/session/blimp_client_session_linux.h" 14 #include "blimp/client/session/blimp_client_session_linux.h"
13 #include "blimp/client/session/navigation_feature.h" 15 #include "blimp/client/session/navigation_feature.h"
14 16
15 namespace { 17 namespace {
16 const char kDefaultUrl[] = "https://www.google.com"; 18 const char kDefaultUrl[] = "https://www.google.com";
17 const int kDummyTabId = 0; 19 const int kDummyTabId = 0;
18 } 20 }
19 21
20 int main(int argc, const char**argv) { 22 int main(int argc, const char**argv) {
21 base::AtExitManager at_exit; 23 base::AtExitManager at_exit;
22
23 base::CommandLine::Init(argc, argv); 24 base::CommandLine::Init(argc, argv);
24 25
25 XInitThreads(); 26 XInitThreads();
26 27
27 blimp::InitializeLogging(); 28 blimp::InitializeLogging();
28 blimp::InitializeMainMessageLoop(); 29 blimp::InitializeMainMessageLoop();
29 30
30 blimp::BlimpClientSessionLinux session; 31 blimp::BlimpClientSessionLinux session;
31 32
32 // If there is a non-switch argument to the command line, load that url. 33 // If there is a non-switch argument to the command line, load that url.
33 base::CommandLine::StringVector args = 34 base::CommandLine::StringVector args =
34 base::CommandLine::ForCurrentProcess()->GetArgs(); 35 base::CommandLine::ForCurrentProcess()->GetArgs();
35 std::string url = args.size() > 0 ? args[0] : kDefaultUrl; 36 std::string url = args.size() > 0 ? args[0] : kDefaultUrl;
36 37
37 session.GetNavigationFeature()->NavigateToUrlText(kDummyTabId, url); 38 session.GetNavigationFeature()->NavigateToUrlText(kDummyTabId, url);
38 39
39 base::RunLoop().Run(); 40 base::RunLoop().Run();
40 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698