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

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

Issue 1760633003: Notify normalizing input filters on blur. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix host build. Created 4 years, 9 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 base::LazyInstance<base::Lock>::Leaky g_logging_lock = 144 base::LazyInstance<base::Lock>::Leaky g_logging_lock =
145 LAZY_INSTANCE_INITIALIZER; 145 LAZY_INSTANCE_INITIALIZER;
146 146
147 } // namespace 147 } // namespace
148 148
149 ChromotingInstance::ChromotingInstance(PP_Instance pp_instance) 149 ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
150 : pp::Instance(pp_instance), 150 : pp::Instance(pp_instance),
151 initialized_(false), 151 initialized_(false),
152 plugin_task_runner_(new PepperMainThreadTaskRunner()), 152 plugin_task_runner_(new PepperMainThreadTaskRunner()),
153 context_(plugin_task_runner_.get()), 153 context_(plugin_task_runner_.get()),
154 input_tracker_(&mouse_input_filter_), 154 touch_input_scaler_(&mouse_input_filter_),
155 touch_input_scaler_(&input_tracker_),
156 key_mapper_(&touch_input_scaler_), 155 key_mapper_(&touch_input_scaler_),
157 input_handler_(&input_tracker_), 156 input_handler_(&input_tracker_),
158 cursor_setter_(this), 157 cursor_setter_(this),
159 empty_cursor_filter_(&cursor_setter_), 158 empty_cursor_filter_(&cursor_setter_),
160 text_input_controller_(this), 159 text_input_controller_(this),
161 use_async_pin_dialog_(false), 160 use_async_pin_dialog_(false),
162 weak_factory_(this) { 161 weak_factory_(this) {
163 // In NaCl global resources need to be initialized differently because they 162 // In NaCl global resources need to be initialized differently because they
164 // are not shared with Chrome. 163 // are not shared with Chrome.
165 thread_task_runner_handle_.reset( 164 thread_task_runner_handle_.reset(
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } else if (key_filter == "cros") { 641 } else if (key_filter == "cros") {
643 normalizing_input_filter_.reset( 642 normalizing_input_filter_.reset(
644 new NormalizingInputFilterCros(&key_mapper_)); 643 new NormalizingInputFilterCros(&key_mapper_));
645 } else if (key_filter == "windows") { 644 } else if (key_filter == "windows") {
646 normalizing_input_filter_.reset( 645 normalizing_input_filter_.reset(
647 new NormalizingInputFilterWin(&key_mapper_)); 646 new NormalizingInputFilterWin(&key_mapper_));
648 } else { 647 } else {
649 DCHECK(key_filter.empty()); 648 DCHECK(key_filter.empty());
650 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_)); 649 normalizing_input_filter_.reset(new protocol::InputFilter(&key_mapper_));
651 } 650 }
652 input_handler_.set_input_stub(normalizing_input_filter_.get()); 651 input_tracker_.set_input_stub(normalizing_input_filter_.get());
653 652
654 // Try initializing 3D video renderer. 653 // Try initializing 3D video renderer.
655 video_renderer_.reset(new PepperVideoRenderer3D()); 654 video_renderer_.reset(new PepperVideoRenderer3D());
656 if (!video_renderer_->Initialize(this, context_, this, &perf_tracker_)) 655 if (!video_renderer_->Initialize(this, context_, this, &perf_tracker_))
657 video_renderer_.reset(); 656 video_renderer_.reset();
658 657
659 // If we didn't initialize 3D renderer then use the 2D renderer. 658 // If we didn't initialize 3D renderer then use the 2D renderer.
660 if (!video_renderer_) { 659 if (!video_renderer_) {
661 LOG(WARNING) 660 LOG(WARNING)
662 << "Failed to initialize 3D renderer. Using 2D renderer instead."; 661 << "Failed to initialize 3D renderer. Using 2D renderer instead.";
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 if (is_custom_counts_histogram) { 1151 if (is_custom_counts_histogram) {
1153 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1152 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1154 histogram_max, histogram_buckets); 1153 histogram_max, histogram_buckets);
1155 } else { 1154 } else {
1156 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1155 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1157 histogram_max, histogram_buckets); 1156 histogram_max, histogram_buckets);
1158 } 1157 }
1159 } 1158 }
1160 1159
1161 } // namespace remoting 1160 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/client/plugin/pepper_input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698