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

Side by Side Diff: blimp/client/core/blimp_client_context_impl.cc

Issue 2249283003: Hooks together Geolocation Feature in the Client and Engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lai
Patch Set: Addresses Wez's #23 comments. Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/client/core/blimp_client_context_impl.h" 5 #include "blimp/client/core/blimp_client_context_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/sequenced_task_runner_handle.h" 10 #include "base/threading/sequenced_task_runner_handle.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 base::MakeUnique<CrossThreadNetworkEventObserver>( 63 base::MakeUnique<CrossThreadNetworkEventObserver>(
64 weak_factory_.GetWeakPtr(), base::SequencedTaskRunnerHandle::Get()))); 64 weak_factory_.GetWeakPtr(), base::SequencedTaskRunnerHandle::Get())));
65 65
66 // The |thread_pipe_manager_| must be set up correctly before features are 66 // The |thread_pipe_manager_| must be set up correctly before features are
67 // registered. 67 // registered.
68 thread_pipe_manager_ = base::MakeUnique<ThreadPipeManager>( 68 thread_pipe_manager_ = base::MakeUnique<ThreadPipeManager>(
69 io_thread_task_runner_, net_components_->GetBrowserConnectionHandler()); 69 io_thread_task_runner_, net_components_->GetBrowserConnectionHandler());
70 70
71 RegisterFeatures(); 71 RegisterFeatures();
72 72
73 // Initialize must only be posted after the calls features have been 73 // Initialize must only be posted after the features have been
74 // registered. 74 // registered.
75 io_thread_task_runner_->PostTask( 75 io_thread_task_runner_->PostTask(
76 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize, 76 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize,
77 base::Unretained(net_components_.get()))); 77 base::Unretained(net_components_.get())));
78 } 78 }
79 79
80 BlimpClientContextImpl::~BlimpClientContextImpl() { 80 BlimpClientContextImpl::~BlimpClientContextImpl() {
81 io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release()); 81 io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release());
82 } 82 }
83 83
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 navigation_feature_->set_outgoing_message_processor( 160 navigation_feature_->set_outgoing_message_processor(
161 thread_pipe_manager_->RegisterFeature(BlimpMessage::kNavigation, 161 thread_pipe_manager_->RegisterFeature(BlimpMessage::kNavigation,
162 navigation_feature_.get())); 162 navigation_feature_.get()));
163 tab_control_feature_->set_outgoing_message_processor( 163 tab_control_feature_->set_outgoing_message_processor(
164 thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl, 164 thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl,
165 tab_control_feature_.get())); 165 tab_control_feature_.get()));
166 } 166 }
167 167
168 } // namespace client 168 } // namespace client
169 } // namespace blimp 169 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698