Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <string> | |
|
Wez
2016/08/30 00:03:58
nit: No need for this here, since the .h already i
CJ
2016/08/31 23:22:56
Done.
| |
| 8 | |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 10 #include "base/threading/sequenced_task_runner_handle.h" | 12 #include "base/threading/sequenced_task_runner_handle.h" |
| 11 #include "blimp/client/core/contents/blimp_contents_impl.h" | 13 #include "blimp/client/core/contents/blimp_contents_impl.h" |
| 12 #include "blimp/client/core/contents/blimp_contents_manager.h" | 14 #include "blimp/client/core/contents/blimp_contents_manager.h" |
| 13 #include "blimp/client/core/contents/ime_feature.h" | 15 #include "blimp/client/core/contents/ime_feature.h" |
| 14 #include "blimp/client/core/contents/navigation_feature.h" | 16 #include "blimp/client/core/contents/navigation_feature.h" |
| 15 #include "blimp/client/core/contents/tab_control_feature.h" | 17 #include "blimp/client/core/contents/tab_control_feature.h" |
| 16 #include "blimp/client/core/session/cross_thread_network_event_observer.h" | 18 #include "blimp/client/core/session/cross_thread_network_event_observer.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 base::MakeUnique<CrossThreadNetworkEventObserver>( | 65 base::MakeUnique<CrossThreadNetworkEventObserver>( |
| 64 weak_factory_.GetWeakPtr(), base::SequencedTaskRunnerHandle::Get()))); | 66 weak_factory_.GetWeakPtr(), base::SequencedTaskRunnerHandle::Get()))); |
| 65 | 67 |
| 66 // The |thread_pipe_manager_| must be set up correctly before features are | 68 // The |thread_pipe_manager_| must be set up correctly before features are |
| 67 // registered. | 69 // registered. |
| 68 thread_pipe_manager_ = base::MakeUnique<ThreadPipeManager>( | 70 thread_pipe_manager_ = base::MakeUnique<ThreadPipeManager>( |
| 69 io_thread_task_runner_, net_components_->GetBrowserConnectionHandler()); | 71 io_thread_task_runner_, net_components_->GetBrowserConnectionHandler()); |
| 70 | 72 |
| 71 RegisterFeatures(); | 73 RegisterFeatures(); |
| 72 | 74 |
| 73 // Initialize must only be posted after the calls features have been | 75 // Initialize must only be posted after the features have been |
| 74 // registered. | 76 // registered. |
| 75 io_thread_task_runner_->PostTask( | 77 io_thread_task_runner_->PostTask( |
| 76 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize, | 78 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize, |
| 77 base::Unretained(net_components_.get()))); | 79 base::Unretained(net_components_.get()))); |
| 78 } | 80 } |
| 79 | 81 |
| 80 BlimpClientContextImpl::~BlimpClientContextImpl() { | 82 BlimpClientContextImpl::~BlimpClientContextImpl() { |
| 81 io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release()); | 83 io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release()); |
| 82 } | 84 } |
| 83 | 85 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 navigation_feature_->set_outgoing_message_processor( | 162 navigation_feature_->set_outgoing_message_processor( |
| 161 thread_pipe_manager_->RegisterFeature(BlimpMessage::kNavigation, | 163 thread_pipe_manager_->RegisterFeature(BlimpMessage::kNavigation, |
| 162 navigation_feature_.get())); | 164 navigation_feature_.get())); |
| 163 tab_control_feature_->set_outgoing_message_processor( | 165 tab_control_feature_->set_outgoing_message_processor( |
| 164 thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl, | 166 thread_pipe_manager_->RegisterFeature(BlimpMessage::kTabControl, |
| 165 tab_control_feature_.get())); | 167 tab_control_feature_.get())); |
| 166 } | 168 } |
| 167 | 169 |
| 168 } // namespace client | 170 } // namespace client |
| 169 } // namespace blimp | 171 } // namespace blimp |
| OLD | NEW |