OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/proxy/raw_var_data.h" | 5 #include "ppapi/proxy/raw_var_data.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 | 710 |
711 void ResourceRawVarData::PopulatePPVar(const PP_Var& var, | 711 void ResourceRawVarData::PopulatePPVar(const PP_Var& var, |
712 const std::vector<PP_Var>& graph) { | 712 const std::vector<PP_Var>& graph) { |
713 } | 713 } |
714 | 714 |
715 void ResourceRawVarData::Write(IPC::Message* m, | 715 void ResourceRawVarData::Write(IPC::Message* m, |
716 const HandleWriter& handle_writer) { | 716 const HandleWriter& handle_writer) { |
717 m->WriteInt(static_cast<int>(pp_resource_)); | 717 m->WriteInt(static_cast<int>(pp_resource_)); |
718 m->WriteInt(pending_renderer_host_id_); | 718 m->WriteInt(pending_renderer_host_id_); |
719 m->WriteInt(pending_browser_host_id_); | 719 m->WriteInt(pending_browser_host_id_); |
720 m->WriteBool(creation_message_); | 720 m->WriteBool(!!creation_message_); |
721 if (creation_message_) | 721 if (creation_message_) |
722 IPC::WriteParam(m, *creation_message_); | 722 IPC::WriteParam(m, *creation_message_); |
723 } | 723 } |
724 | 724 |
725 bool ResourceRawVarData::Read(PP_VarType type, | 725 bool ResourceRawVarData::Read(PP_VarType type, |
726 const IPC::Message* m, | 726 const IPC::Message* m, |
727 base::PickleIterator* iter) { | 727 base::PickleIterator* iter) { |
728 int value; | 728 int value; |
729 if (!iter->ReadInt(&value)) | 729 if (!iter->ReadInt(&value)) |
730 return false; | 730 return false; |
(...skipping 10 matching lines...) Expand all Loading... |
741 if (!IPC::ReadParam(m, iter, creation_message_.get())) | 741 if (!IPC::ReadParam(m, iter, creation_message_.get())) |
742 return false; | 742 return false; |
743 } else { | 743 } else { |
744 creation_message_.reset(); | 744 creation_message_.reset(); |
745 } | 745 } |
746 return true; | 746 return true; |
747 } | 747 } |
748 | 748 |
749 } // namespace proxy | 749 } // namespace proxy |
750 } // namespace ppapi | 750 } // namespace ppapi |
OLD | NEW |