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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 2101833002: [Remoting Android] DisplayUpdaterFactory cleanups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build Fix again Created 4 years, 5 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 (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
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 video_renderer_->SetPepperContext(this, this);
637 if (!video_renderer_->Initialize(context_, &perf_tracker_)) {
637 video_renderer_.reset(); 638 video_renderer_.reset();
639 }
638 640
639 // If we didn't initialize 3D renderer then use the 2D renderer. 641 // If we didn't initialize 3D renderer then use the 2D renderer.
640 if (!video_renderer_) { 642 if (!video_renderer_) {
641 LOG(WARNING) 643 LOG(WARNING)
642 << "Failed to initialize 3D renderer. Using 2D renderer instead."; 644 << "Failed to initialize 3D renderer. Using 2D renderer instead.";
643 video_renderer_.reset(new PepperVideoRenderer2D()); 645 video_renderer_.reset(new PepperVideoRenderer2D());
644 if (!video_renderer_->Initialize(this, context_, this, &perf_tracker_)) 646 video_renderer_->SetPepperContext(this, this);
647 if (!video_renderer_->Initialize(context_, &perf_tracker_)) {
645 video_renderer_.reset(); 648 video_renderer_.reset();
649 }
646 } 650 }
647 651
648 CHECK(video_renderer_); 652 CHECK(video_renderer_);
649 653
650 perf_tracker_.SetUpdateUmaCallbacks( 654 perf_tracker_.SetUpdateUmaCallbacks(
651 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram, 655 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram,
652 weak_factory_.GetWeakPtr(), true), 656 weak_factory_.GetWeakPtr(), true),
653 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram, 657 base::Bind(&ChromotingInstance::UpdateUmaCustomHistogram,
654 weak_factory_.GetWeakPtr(), false), 658 weak_factory_.GetWeakPtr(), false),
655 base::Bind(&ChromotingInstance::UpdateUmaEnumHistogram, 659 base::Bind(&ChromotingInstance::UpdateUmaEnumHistogram,
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 if (is_custom_counts_histogram) { 1126 if (is_custom_counts_histogram) {
1123 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1127 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1124 histogram_max, histogram_buckets); 1128 histogram_max, histogram_buckets);
1125 } else { 1129 } else {
1126 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1130 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1127 histogram_max, histogram_buckets); 1131 histogram_max, histogram_buckets);
1128 } 1132 }
1129 } 1133 }
1130 1134
1131 } // namespace remoting 1135 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698