Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: ppapi/proxy/raw_var_data.cc

Issue 605593002: PPAPI: Support sending browser-hosted resources synchronously Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content_browsertests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/serialized_structs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 if (!resource_var) 683 if (!resource_var)
684 return false; 684 return false;
685 pp_resource_ = resource_var->GetPPResource(); 685 pp_resource_ = resource_var->GetPPResource();
686 const IPC::Message* message = resource_var->GetCreationMessage(); 686 const IPC::Message* message = resource_var->GetCreationMessage();
687 if (message) 687 if (message)
688 creation_message_.reset(new IPC::Message(*message)); 688 creation_message_.reset(new IPC::Message(*message));
689 else 689 else
690 creation_message_.reset(); 690 creation_message_.reset();
691 pending_renderer_host_id_ = resource_var->GetPendingRendererHostId(); 691 pending_renderer_host_id_ = resource_var->GetPendingRendererHostId();
692 pending_browser_host_id_ = resource_var->GetPendingBrowserHostId(); 692 pending_browser_host_id_ = resource_var->GetPendingBrowserHostId();
693
693 initialized_ = true; 694 initialized_ = true;
694 return true; 695 return true;
695 } 696 }
696 697
697 PP_Var ResourceRawVarData::CreatePPVar(PP_Instance instance) { 698 PP_Var ResourceRawVarData::CreatePPVar(PP_Instance instance) {
698 // If this is not a pending resource host, just create the var. 699 // If this is not a pending resource host, just create the var.
699 if (pp_resource_ || !creation_message_) { 700 if (pp_resource_ || !creation_message_) {
700 return PpapiGlobals::Get()->GetVarTracker()->MakeResourcePPVar( 701 return PpapiGlobals::Get()->GetVarTracker()->MakeResourcePPVar(
701 pp_resource_); 702 pp_resource_);
702 } 703 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 if (!IPC::ParamTraits<IPC::Message>::Read(m, iter, creation_message_.get())) 743 if (!IPC::ParamTraits<IPC::Message>::Read(m, iter, creation_message_.get()))
743 return false; 744 return false;
744 } else { 745 } else {
745 creation_message_.reset(); 746 creation_message_.reset();
746 } 747 }
747 return true; 748 return true;
748 } 749 }
749 750
750 } // namespace proxy 751 } // namespace proxy
751 } // namespace ppapi 752 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/serialized_structs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698