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/context/blimp_client_context_impl.h" | 5 #include "blimp/client/core/context/blimp_client_context_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 settings_feature_->PushSettings(); | 132 settings_feature_->PushSettings(); |
| 133 | 133 |
| 134 connection_status_.AddObserver(this); | 134 connection_status_.AddObserver(this); |
| 135 | 135 |
| 136 // Initialize must only be posted after the features have been | 136 // Initialize must only be posted after the features have been |
| 137 // registered. | 137 // registered. |
| 138 io_thread_task_runner_->PostTask( | 138 io_thread_task_runner_->PostTask( |
| 139 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize, | 139 FROM_HERE, base::Bind(&ClientNetworkComponents::Initialize, |
| 140 base::Unretained(net_components_.get()))); | 140 base::Unretained(net_components_.get()))); |
| 141 | 141 |
| 142 // Enable the updated compositing path before any tabs are created. | |
| 143 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
|
David Trainor- moved to gerrit
2016/11/04 04:23:54
Might be nice to have a function like the one for
Khushal
2016/11/04 04:26:48
That's a cool idea. Is there a better place to do
| |
| 144 switches::kEnableUpdatedCompositingPath); | |
| 145 | |
| 142 UMA_HISTOGRAM_BOOLEAN("Blimp.Supported", true); | 146 UMA_HISTOGRAM_BOOLEAN("Blimp.Supported", true); |
| 143 } | 147 } |
| 144 | 148 |
| 145 BlimpClientContextImpl::~BlimpClientContextImpl() { | 149 BlimpClientContextImpl::~BlimpClientContextImpl() { |
| 146 io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release()); | 150 io_thread_task_runner_->DeleteSoon(FROM_HERE, net_components_.release()); |
| 147 connection_status_.RemoveObserver(this); | 151 connection_status_.RemoveObserver(this); |
| 148 } | 152 } |
| 149 | 153 |
| 150 void BlimpClientContextImpl::SetDelegate(BlimpClientContextDelegate* delegate) { | 154 void BlimpClientContextImpl::SetDelegate(BlimpClientContextDelegate* delegate) { |
| 151 delegate_ = delegate; | 155 delegate_ = delegate; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 if (result >= 0) { | 273 if (result >= 0) { |
| 270 delegate_->OnEngineDisconnected(result); | 274 delegate_->OnEngineDisconnected(result); |
| 271 } else { | 275 } else { |
| 272 delegate_->OnNetworkDisconnected(result); | 276 delegate_->OnNetworkDisconnected(result); |
| 273 } | 277 } |
| 274 } | 278 } |
| 275 } | 279 } |
| 276 | 280 |
| 277 } // namespace client | 281 } // namespace client |
| 278 } // namespace blimp | 282 } // namespace blimp |
| OLD | NEW |