diff options
author | nyquist <nyquist@chromium.org> | 2016-02-01 20:49:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-02 04:54:47 +0000 |
commit | 7dbd1d2d73f422d197337abf08ed0dc7c99d3e0d (patch) | |
tree | 0306c235d2f3eb78838187442bd9cb6087faaa22 /blimp/client/app/linux/blimp_main.cc | |
parent | afc918de00a2f2895b4d8eaf3a043e654ba5e8fb (diff) | |
download | chromium_src-7dbd1d2d73f422d197337abf08ed0dc7c99d3e0d.zip chromium_src-7dbd1d2d73f422d197337abf08ed0dc7c99d3e0d.tar.gz chromium_src-7dbd1d2d73f422d197337abf08ed0dc7c99d3e0d.tar.bz2 |
Add initial framework for AssignmentSource.
This CL moves reading the command line params for engine connection
to a default AssignmentSource instead of being a part of
BlimpClientSession. This is required going forward to be able to
implement something that communicates with the real assigner.
In addition this CL also makes the connection step asynchronous
instead of happening during the construction of the
BlimpClientSession. This is important so that going forward, the
request to get an assignment does not block startup.
BUG=582668
Review URL: https://codereview.chromium.org/1648383004
Cr-Commit-Position: refs/heads/master@{#372892}
Diffstat (limited to 'blimp/client/app/linux/blimp_main.cc')
-rw-r--r-- | blimp/client/app/linux/blimp_main.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/blimp/client/app/linux/blimp_main.cc b/blimp/client/app/linux/blimp_main.cc index 159ee6f..332a793 100644 --- a/blimp/client/app/linux/blimp_main.cc +++ b/blimp/client/app/linux/blimp_main.cc @@ -9,11 +9,13 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "base/run_loop.h" +#include "base/thread_task_runner_handle.h" #include "base/threading/thread.h" #include "blimp/client/app/blimp_startup.h" #include "blimp/client/app/linux/blimp_client_session_linux.h" #include "blimp/client/feature/navigation_feature.h" #include "blimp/client/feature/tab_control_feature.h" +#include "blimp/client/session/assignment_source.h" namespace { const char kDefaultUrl[] = "https://www.google.com"; @@ -29,8 +31,12 @@ int main(int argc, const char**argv) { blimp::client::InitializeLogging(); blimp::client::InitializeMainMessageLoop(); - blimp::client::BlimpClientSessionLinux session; + scoped_ptr<blimp::client::AssignmentSource> assignment_source = + make_scoped_ptr(new blimp::client::AssignmentSource( + base::ThreadTaskRunnerHandle::Get())); + blimp::client::BlimpClientSessionLinux session(std::move(assignment_source)); session.GetTabControlFeature()->CreateTab(kDummyTabId); + session.Connect(); // If there is a non-switch argument to the command line, load that url. base::CommandLine::StringVector args = |