Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "remoting/client/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
| 6 | 6 |
| 7 #include <nacl_io/nacl_io.h> | 7 #include <nacl_io/nacl_io.h> |
| 8 #include <sys/mount.h> | 8 #include <sys/mount.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 626 normalizing_input_filter_.reset( | 626 normalizing_input_filter_.reset( |
| 627 new NormalizingInputFilterWin(&key_mapper_)); | 627 new NormalizingInputFilterWin(&key_mapper_)); |
| 628 } else { | 628 } else { |
| 629 DCHECK(key_filter.empty()); | 629 DCHECK(key_filter.empty()); |
| 630 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_)); | 630 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_)); |
| 631 } | 631 } |
| 632 input_tracker_.set_input_stub(normalizing_input_filter_.get()); | 632 input_tracker_.set_input_stub(normalizing_input_filter_.get()); |
| 633 | 633 |
| 634 // Try initializing 3D video renderer. | 634 // Try initializing 3D video renderer. |
| 635 video_renderer_.reset(new PepperVideoRenderer3D()); | 635 video_renderer_.reset(new PepperVideoRenderer3D()); |
| 636 if (!video_renderer_->Initialize(this, context_, this, &perf_tracker_)) | 636 if (!video_renderer_->InitializePepper(this, context_, this, &perf_tracker_)) |
| 637 video_renderer_.reset(); | 637 video_renderer_.reset(); |
| 638 | 638 |
| 639 // If we didn't initialize 3D renderer then use the 2D renderer. | 639 // If we didn't initialize 3D renderer then use the 2D renderer. |
| 640 if (!video_renderer_) { | 640 if (!video_renderer_) { |
| 641 LOG(WARNING) | 641 LOG(WARNING) |
| 642 << "Failed to initialize 3D renderer. Using 2D renderer instead."; | 642 << "Failed to initialize 3D renderer. Using 2D renderer instead."; |
| 643 video_renderer_.reset(new PepperVideoRenderer2D()); | 643 video_renderer_.reset(new PepperVideoRenderer2D()); |
| 644 if (!video_renderer_->Initialize(this, context_, this, &perf_tracker_)) | 644 if (!video_renderer_->InitializePepper(this, context_, this, |
| 645 &perf_tracker_)) | |
| 645 video_renderer_.reset(); | 646 video_renderer_.reset(); |
|
Sergey Ulanov
2016/06/28 17:59:50
add {}
Yuwei
2016/06/28 18:46:06
Done.
| |
| 646 } | 647 } |
| 647 | 648 |
| 648 CHECK(video_renderer_); | 649 CHECK(video_renderer_); |
| 649 | 650 |
| 650 perf_tracker_.SetUpdateUmaCallbacks( | 651 perf_tracker_.SetUpdateUmaCallbacks( |
| 651 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram, | 652 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram, |
| 652 weak_factory_.GetWeakPtr(), true), | 653 weak_factory_.GetWeakPtr(), true), |
| 653 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram, | 654 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram, |
| 654 weak_factory_.GetWeakPtr(), false), | 655 weak_factory_.GetWeakPtr(), false), |
| 655 base::Bind(&ChromotingInstance::UpdateUmaEnumHistogram, | 656 base::Bind(&ChromotingInstance::UpdateUmaEnumHistogram, |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1122 if (is_custom_counts_histogram) { | 1123 if (is_custom_counts_histogram) { |
| 1123 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1124 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
| 1124 histogram_max, histogram_buckets); | 1125 histogram_max, histogram_buckets); |
| 1125 } else { | 1126 } else { |
| 1126 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1127 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
| 1127 histogram_max, histogram_buckets); | 1128 histogram_max, histogram_buckets); |
| 1128 } | 1129 } |
| 1129 } | 1130 } |
| 1130 | 1131 |
| 1131 } // namespace remoting | 1132 } // namespace remoting |
| OLD | NEW |