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 <stdio.h> | 5 #include <stdio.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/stringize_macros.h" | 14 #include "base/stringize_macros.h" |
| 15 #include "net/socket/ssl_server_socket.h" | |
| 15 #include "remoting/base/plugin_message_loop_proxy.h" | 16 #include "remoting/base/plugin_message_loop_proxy.h" |
| 16 #include "remoting/host/plugin/constants.h" | 17 #include "remoting/host/plugin/constants.h" |
| 17 #include "remoting/host/plugin/host_log_handler.h" | 18 #include "remoting/host/plugin/host_log_handler.h" |
| 18 #include "remoting/host/plugin/host_plugin_utils.h" | 19 #include "remoting/host/plugin/host_plugin_utils.h" |
| 19 #include "remoting/host/plugin/host_script_object.h" | 20 #include "remoting/host/plugin/host_script_object.h" |
| 20 #include "third_party/npapi/bindings/npapi.h" | 21 #include "third_party/npapi/bindings/npapi.h" |
| 21 #include "third_party/npapi/bindings/npfunctions.h" | 22 #include "third_party/npapi/bindings/npfunctions.h" |
| 22 #include "third_party/npapi/bindings/npruntime.h" | 23 #include "third_party/npapi/bindings/npruntime.h" |
| 23 | 24 |
| 24 // Symbol export is handled with a separate def file on Windows. | 25 // Symbol export is handled with a separate def file on Windows. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 &supports_cocoa); | 108 &supports_cocoa); |
| 108 if (err == NPERR_NO_ERROR && supports_cocoa) { | 109 if (err == NPERR_NO_ERROR && supports_cocoa) { |
| 109 // Switch to Cocoa event model. | 110 // Switch to Cocoa event model. |
| 110 g_npnetscape_funcs->setvalue(instance_, NPPVpluginEventModel, | 111 g_npnetscape_funcs->setvalue(instance_, NPPVpluginEventModel, |
| 111 reinterpret_cast<void*>(NPEventModelCocoa)); | 112 reinterpret_cast<void*>(NPEventModelCocoa)); |
| 112 } else { | 113 } else { |
| 113 LOG(ERROR) << "No Cocoa Event Model support"; | 114 LOG(ERROR) << "No Cocoa Event Model support"; |
| 114 return false; | 115 return false; |
| 115 } | 116 } |
| 116 #endif // OS_MACOSX | 117 #endif // OS_MACOSX |
| 118 net::EnableSSLServerSockets(); | |
|
Wez
2012/06/12 21:30:35
nit: Add a comment explaining why we call this at
| |
| 117 return true; | 119 return true; |
| 118 } | 120 } |
| 119 | 121 |
| 120 bool Save(NPSavedData** saved) { | 122 bool Save(NPSavedData** saved) { |
| 121 return true; | 123 return true; |
| 122 } | 124 } |
| 123 | 125 |
| 124 NPObject* GetScriptableObject() { | 126 NPObject* GetScriptableObject() { |
| 125 if (!scriptable_object_) { | 127 if (!scriptable_object_) { |
| 126 // Must be static. If it is a temporary, objects created by this | 128 // Must be static. If it is a temporary, objects created by this |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 } | 509 } |
| 508 | 510 |
| 509 EXPORT NPError API_CALL NP_GetValue(void* npp, | 511 EXPORT NPError API_CALL NP_GetValue(void* npp, |
| 510 NPPVariable variable, | 512 NPPVariable variable, |
| 511 void* value) { | 513 void* value) { |
| 512 return GetValue((NPP)npp, variable, value); | 514 return GetValue((NPP)npp, variable, value); |
| 513 } | 515 } |
| 514 #endif | 516 #endif |
| 515 | 517 |
| 516 } // extern "C" | 518 } // extern "C" |
| OLD | NEW |