OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // while sending the log message to the UI. | 41 // while sending the log message to the UI. |
42 static bool g_logging_to_plugin = false; | 42 static bool g_logging_to_plugin = false; |
43 static bool g_has_logging_instance = false; | 43 static bool g_has_logging_instance = false; |
44 static ChromotingInstance* g_logging_instance = NULL; | 44 static ChromotingInstance* g_logging_instance = NULL; |
45 static logging::LogMessageHandlerFunction g_logging_old_handler = NULL; | 45 static logging::LogMessageHandlerFunction g_logging_old_handler = NULL; |
46 | 46 |
47 const char ChromotingInstance::kMimeType[] = "pepper-application/x-chromoting"; | 47 const char ChromotingInstance::kMimeType[] = "pepper-application/x-chromoting"; |
48 | 48 |
49 static base::LazyInstance<base::Lock, | 49 static base::LazyInstance<base::Lock, |
50 base::LeakyLazyInstanceTraits<base::Lock> > | 50 base::LeakyLazyInstanceTraits<base::Lock> > |
51 g_logging_lock(base::LINKER_INITIALIZED); | 51 g_logging_lock = LAZY_INSTANCE_INITIALIZER; |
52 | 52 |
53 ChromotingInstance::ChromotingInstance(PP_Instance pp_instance) | 53 ChromotingInstance::ChromotingInstance(PP_Instance pp_instance) |
54 : pp::InstancePrivate(pp_instance), | 54 : pp::InstancePrivate(pp_instance), |
55 initialized_(false), | 55 initialized_(false), |
56 plugin_message_loop_( | 56 plugin_message_loop_( |
57 new PluginMessageLoopProxy(&plugin_thread_delegate_)), | 57 new PluginMessageLoopProxy(&plugin_thread_delegate_)), |
58 context_(plugin_message_loop_), | 58 context_(plugin_message_loop_), |
59 scale_to_fit_(false), | 59 scale_to_fit_(false), |
60 thread_proxy_(new ScopedThreadProxy(plugin_message_loop_)) { | 60 thread_proxy_(new ScopedThreadProxy(plugin_message_loop_)) { |
61 RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL); | 61 RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL); |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 405 |
406 void ChromotingInstance::ReleaseAllKeys() { | 406 void ChromotingInstance::ReleaseAllKeys() { |
407 if (!input_handler_.get()) { | 407 if (!input_handler_.get()) { |
408 return; | 408 return; |
409 } | 409 } |
410 | 410 |
411 input_handler_->ReleaseAllKeys(); | 411 input_handler_->ReleaseAllKeys(); |
412 } | 412 } |
413 | 413 |
414 } // namespace remoting | 414 } // namespace remoting |
OLD | NEW |