Chromium Code Reviews| 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 "ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.h" | 5 #include "ppapi/native_client/src/shared/ppapi_proxy/ppp_instance_combined.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | |
| 8 | 9 |
| 9 namespace ppapi_proxy { | 10 namespace ppapi_proxy { |
| 10 | 11 |
| 11 PPP_Instance_Combined::PPP_Instance_Combined() | 12 PPP_Instance_Combined::PPP_Instance_Combined() |
| 12 : initialized_(false), | 13 : initialized_(false), |
| 13 did_change_view_1_0_(NULL) { | 14 did_change_view_1_0_(NULL) { |
| 15 memset(&instance_1_1_, 0, sizeof(instance_1_1_)); | |
|
dmichael (off chromium)
2012/02/06 18:38:07
doesn't it suffice to just put instance_1_1_() in
James Hawkins
2012/02/07 21:09:21
The default constructor doesn't initialize the POD
dmichael (off chromium)
2012/02/07 21:30:19
instance_1_1_ is a POD struct. Adding instance_1_1
| |
| 14 } | 16 } |
| 15 | 17 |
| 16 void PPP_Instance_Combined::Init1_0(const PPP_Instance_1_0* instance_if) { | 18 void PPP_Instance_Combined::Init1_0(const PPP_Instance_1_0* instance_if) { |
| 17 initialized_ = true; | 19 initialized_ = true; |
| 18 did_change_view_1_0_ = instance_if->DidChangeView; | 20 did_change_view_1_0_ = instance_if->DidChangeView; |
| 19 instance_1_1_.DidCreate = instance_if->DidCreate; | 21 instance_1_1_.DidCreate = instance_if->DidCreate; |
| 20 instance_1_1_.DidDestroy = instance_if->DidDestroy; | 22 instance_1_1_.DidDestroy = instance_if->DidDestroy; |
| 21 instance_1_1_.DidChangeView = NULL; | 23 instance_1_1_.DidChangeView = NULL; |
| 22 instance_1_1_.DidChangeFocus = instance_if->DidChangeFocus; | 24 instance_1_1_.DidChangeFocus = instance_if->DidChangeFocus; |
| 23 instance_1_1_.HandleDocumentLoad = instance_if->HandleDocumentLoad; | 25 instance_1_1_.HandleDocumentLoad = instance_if->HandleDocumentLoad; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 54 instance_1_1_.DidChangeFocus(instance, has_focus); | 56 instance_1_1_.DidChangeFocus(instance, has_focus); |
| 55 } | 57 } |
| 56 | 58 |
| 57 PP_Bool PPP_Instance_Combined::HandleDocumentLoad(PP_Instance instance, | 59 PP_Bool PPP_Instance_Combined::HandleDocumentLoad(PP_Instance instance, |
| 58 PP_Resource url_loader) { | 60 PP_Resource url_loader) { |
| 59 return instance_1_1_.HandleDocumentLoad(instance, url_loader); | 61 return instance_1_1_.HandleDocumentLoad(instance, url_loader); |
| 60 } | 62 } |
| 61 | 63 |
| 62 } // namespace ppapi_proxy | 64 } // namespace ppapi_proxy |
| 63 | 65 |
| OLD | NEW |