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 "content/renderer/pepper/pepper_in_process_resource_creation.h" | 5 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 *description, | 64 *description, |
65 prefs))->GetReference(); | 65 prefs))->GetReference(); |
66 } | 66 } |
67 | 67 |
68 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( | 68 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( |
69 PP_Instance instance, | 69 PP_Instance instance, |
70 PP_FileChooserMode_Dev mode, | 70 PP_FileChooserMode_Dev mode, |
71 const PP_Var& accept_types) { | 71 const PP_Var& accept_types) { |
72 scoped_refptr<ppapi::StringVar> string_var = | 72 scoped_refptr<ppapi::StringVar> string_var = |
73 ppapi::StringVar::FromPPVar(accept_types); | 73 ppapi::StringVar::FromPPVar(accept_types); |
74 std::string str = string_var ? string_var->value() : std::string(); | 74 std::string str = string_var.get() ? string_var->value() : std::string(); |
75 return (new ppapi::proxy::FileChooserResource( | 75 return (new ppapi::proxy::FileChooserResource( |
76 host_impl_->in_process_router()->GetPluginConnection(), | 76 host_impl_->in_process_router()->GetPluginConnection(), |
77 instance, mode, str.c_str()))->GetReference(); | 77 instance, |
| 78 mode, |
| 79 str.c_str()))->GetReference(); |
78 } | 80 } |
79 | 81 |
80 PP_Resource PepperInProcessResourceCreation::CreateFileIO( | 82 PP_Resource PepperInProcessResourceCreation::CreateFileIO( |
81 PP_Instance instance) { | 83 PP_Instance instance) { |
82 return (new ppapi::proxy::FileIOResource( | 84 return (new ppapi::proxy::FileIOResource( |
83 host_impl_->in_process_router()->GetPluginConnection(), | 85 host_impl_->in_process_router()->GetPluginConnection(), |
84 instance))->GetReference(); | 86 instance))->GetReference(); |
85 } | 87 } |
86 | 88 |
87 PP_Resource PepperInProcessResourceCreation::CreateFileSystem( | 89 PP_Resource PepperInProcessResourceCreation::CreateFileSystem( |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 141 } |
140 | 142 |
141 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( | 143 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( |
142 PP_Instance instance) { | 144 PP_Instance instance) { |
143 return (new ppapi::proxy::WebSocketResource( | 145 return (new ppapi::proxy::WebSocketResource( |
144 host_impl_->in_process_router()->GetPluginConnection(), | 146 host_impl_->in_process_router()->GetPluginConnection(), |
145 instance))->GetReference(); | 147 instance))->GetReference(); |
146 } | 148 } |
147 | 149 |
148 } // namespace content | 150 } // namespace content |
OLD | NEW |