| 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 // This implements the required interfaces for representing a plugin module | 5 // This implements the required interfaces for representing a plugin module |
| 6 // instance in browser interactions and provides a way to register custom | 6 // instance in browser interactions and provides a way to register custom |
| 7 // plugin interfaces. | 7 // plugin interfaces. |
| 8 // | 8 // |
| 9 | 9 |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 set_pp_instance(instance); | 90 set_pp_instance(instance); |
| 91 SetupTests(); | 91 SetupTests(); |
| 92 | 92 |
| 93 return PP_TRUE; | 93 return PP_TRUE; |
| 94 } | 94 } |
| 95 | 95 |
| 96 void DidDestroyDefault(PP_Instance /*instance*/) { | 96 void DidDestroyDefault(PP_Instance /*instance*/) { |
| 97 } | 97 } |
| 98 | 98 |
| 99 void DidChangeViewDefault(PP_Instance /*instance*/, | 99 void DidChangeViewDefault(PP_Instance /*instance*/, PP_Resource /*view*/) { |
| 100 const struct PP_Rect* /*position*/, | |
| 101 const struct PP_Rect* /*clip*/) { | |
| 102 } | 100 } |
| 103 | 101 |
| 104 void DidChangeFocusDefault(PP_Instance /*instance*/, | 102 void DidChangeFocusDefault(PP_Instance /*instance*/, |
| 105 PP_Bool /*has_focus*/) { | 103 PP_Bool /*has_focus*/) { |
| 106 } | 104 } |
| 107 | 105 |
| 108 PP_Bool HandleDocumentLoadDefault(PP_Instance instance, | 106 PP_Bool HandleDocumentLoadDefault(PP_Instance instance, |
| 109 PP_Resource url_loader) { | 107 PP_Resource url_loader) { |
| 110 return PP_TRUE; | 108 return PP_TRUE; |
| 111 } | 109 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // so we supply our own. | 164 // so we supply our own. |
| 167 if (0 == strncmp(PPP_MESSAGING_INTERFACE, interface_name, | 165 if (0 == strncmp(PPP_MESSAGING_INTERFACE, interface_name, |
| 168 strlen(PPP_MESSAGING_INTERFACE))) { | 166 strlen(PPP_MESSAGING_INTERFACE))) { |
| 169 CHECK(ppp == NULL); | 167 CHECK(ppp == NULL); |
| 170 return &ppp_messaging_interface; | 168 return &ppp_messaging_interface; |
| 171 } | 169 } |
| 172 // All other interfaces are to be optionally supplied by the tester, | 170 // All other interfaces are to be optionally supplied by the tester, |
| 173 // so we return whatever was added in SetupPluginInterfaces() (if anything). | 171 // so we return whatever was added in SetupPluginInterfaces() (if anything). |
| 174 return ppp; | 172 return ppp; |
| 175 } | 173 } |
| OLD | NEW |