| 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 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 6 #define REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | |
| 11 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 13 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 14 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_rect.h" | 14 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
| 17 #include "ppapi/cpp/instance.h" | 16 #include "ppapi/cpp/instance.h" |
| 18 #include "ppapi/cpp/text_input_controller.h" | 17 #include "ppapi/cpp/text_input_controller.h" |
| 19 #include "ppapi/cpp/var.h" | 18 #include "ppapi/cpp/var.h" |
| 20 #include "remoting/client/client_context.h" | 19 #include "remoting/client/client_context.h" |
| 21 #include "remoting/client/client_user_interface.h" | 20 #include "remoting/client/client_user_interface.h" |
| 22 #include "remoting/client/empty_cursor_filter.h" | 21 #include "remoting/client/empty_cursor_filter.h" |
| 23 #include "remoting/client/key_event_mapper.h" | 22 #include "remoting/client/key_event_mapper.h" |
| 24 #include "remoting/client/plugin/pepper_cursor_setter.h" | 23 #include "remoting/client/plugin/pepper_cursor_setter.h" |
| 25 #include "remoting/client/plugin/pepper_input_handler.h" | 24 #include "remoting/client/plugin/pepper_input_handler.h" |
| 26 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" | 25 #include "remoting/client/plugin/pepper_plugin_thread_delegate.h" |
| 27 #include "remoting/client/plugin/pepper_video_renderer.h" | 26 #include "remoting/client/plugin/pepper_video_renderer.h" |
| 28 #include "remoting/client/touch_input_scaler.h" | 27 #include "remoting/client/touch_input_scaler.h" |
| 29 #include "remoting/proto/event.pb.h" | 28 #include "remoting/proto/event.pb.h" |
| 30 #include "remoting/protocol/client_stub.h" | 29 #include "remoting/protocol/client_stub.h" |
| 31 #include "remoting/protocol/clipboard_stub.h" | 30 #include "remoting/protocol/clipboard_stub.h" |
| 32 #include "remoting/protocol/connection_to_host.h" | 31 #include "remoting/protocol/connection_to_host.h" |
| 33 #include "remoting/protocol/cursor_shape_stub.h" | 32 #include "remoting/protocol/cursor_shape_stub.h" |
| 34 #include "remoting/protocol/input_event_tracker.h" | 33 #include "remoting/protocol/input_event_tracker.h" |
| 35 #include "remoting/protocol/mouse_input_filter.h" | 34 #include "remoting/protocol/mouse_input_filter.h" |
| 36 #include "remoting/protocol/negotiating_client_authenticator.h" | 35 #include "remoting/protocol/negotiating_client_authenticator.h" |
| 37 #include "remoting/protocol/performance_tracker.h" | 36 #include "remoting/protocol/performance_tracker.h" |
| 38 #include "remoting/protocol/performance_tracker.h" | |
| 39 #include "remoting/protocol/third_party_client_authenticator.h" | 37 #include "remoting/protocol/third_party_client_authenticator.h" |
| 40 | 38 |
| 41 namespace base { | 39 namespace base { |
| 42 class DictionaryValue; | 40 class DictionaryValue; |
| 43 } // namespace base | 41 } // namespace base |
| 44 | 42 |
| 45 namespace pp { | 43 namespace pp { |
| 46 class InputEvent; | 44 class InputEvent; |
| 47 class Module; | 45 class Module; |
| 48 class VarDictionary; | 46 class VarDictionary; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // Updates the specified UMA custom counts or custom times histogram with the | 172 // Updates the specified UMA custom counts or custom times histogram with the |
| 175 // input value. | 173 // input value. |
| 176 void UpdateUmaCustomHistogram(bool is_custom_counts_histogram, | 174 void UpdateUmaCustomHistogram(bool is_custom_counts_histogram, |
| 177 const std::string& histogram_name, | 175 const std::string& histogram_name, |
| 178 int64 value, | 176 int64 value, |
| 179 int histogram_min, | 177 int histogram_min, |
| 180 int histogram_max, | 178 int histogram_max, |
| 181 int histogram_buckets); | 179 int histogram_buckets); |
| 182 | 180 |
| 183 private: | 181 private: |
| 184 FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup); | |
| 185 | |
| 186 // Used as the |FetchSecretCallback| for IT2Me (or Me2Me from old webapps). | 182 // Used as the |FetchSecretCallback| for IT2Me (or Me2Me from old webapps). |
| 187 // Immediately calls |secret_fetched_callback| with |shared_secret|. | 183 // Immediately calls |secret_fetched_callback| with |shared_secret|. |
| 188 static void FetchSecretFromString( | 184 static void FetchSecretFromString( |
| 189 const std::string& shared_secret, | 185 const std::string& shared_secret, |
| 190 bool pairing_supported, | 186 bool pairing_supported, |
| 191 const protocol::SecretFetchedCallback& secret_fetched_callback); | 187 const protocol::SecretFetchedCallback& secret_fetched_callback); |
| 192 | 188 |
| 193 // Message handlers for messages that come from JavaScript. Called | 189 // Message handlers for messages that come from JavaScript. Called |
| 194 // from HandleMessage(). | 190 // from HandleMessage(). |
| 195 void HandleConnect(const base::DictionaryValue& data); | 191 void HandleConnect(const base::DictionaryValue& data); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 291 |
| 296 // Weak reference to this instance, used for global logging and task posting. | 292 // Weak reference to this instance, used for global logging and task posting. |
| 297 base::WeakPtrFactory<ChromotingInstance> weak_factory_; | 293 base::WeakPtrFactory<ChromotingInstance> weak_factory_; |
| 298 | 294 |
| 299 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); | 295 DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |
| 300 }; | 296 }; |
| 301 | 297 |
| 302 } // namespace remoting | 298 } // namespace remoting |
| 303 | 299 |
| 304 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ | 300 #endif // REMOTING_CLIENT_PLUGIN_CHROMOTING_INSTANCE_H_ |
| OLD | NEW |