| Index: webkit/plugins/ppapi/ppb_file_chooser_impl.cc
|
| diff --git a/webkit/plugins/ppapi/ppb_file_chooser_impl.cc b/webkit/plugins/ppapi/ppb_file_chooser_impl.cc
|
| index 14f4784a03ff3212cfa162a4f29477be3e9f4167..f97852b238fd1abe4ca8fa59f57ced8753f7ea22 100644
|
| --- a/webkit/plugins/ppapi/ppb_file_chooser_impl.cc
|
| +++ b/webkit/plugins/ppapi/ppb_file_chooser_impl.cc
|
| @@ -17,14 +17,14 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
|
| +#include "webkit/glue/webkit_glue.h"
|
| #include "webkit/plugins/ppapi/callbacks.h"
|
| #include "webkit/plugins/ppapi/common.h"
|
| #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
|
| #include "webkit/plugins/ppapi/plugin_delegate.h"
|
| #include "webkit/plugins/ppapi/plugin_module.h"
|
| #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
|
| -#include "webkit/plugins/ppapi/resource_tracker.h"
|
| -#include "webkit/glue/webkit_glue.h"
|
| +#include "webkit/plugins/ppapi/resource_helper.h"
|
|
|
| using ppapi::StringVar;
|
| using ppapi::thunk::PPB_FileChooser_API;
|
| @@ -63,7 +63,7 @@ class FileChooserCompletionImpl : public WebFileChooserCompletion {
|
| } // namespace
|
|
|
| PPB_FileChooser_Impl::PPB_FileChooser_Impl(
|
| - PluginInstance* instance,
|
| + PP_Instance instance,
|
| PP_FileChooserMode_Dev mode,
|
| const PP_Var& accept_mime_types)
|
| : Resource(instance),
|
| @@ -79,7 +79,7 @@ PPB_FileChooser_Impl::~PPB_FileChooser_Impl() {
|
|
|
| // static
|
| PP_Resource PPB_FileChooser_Impl::Create(
|
| - PluginInstance* instance,
|
| + PP_Instance instance,
|
| PP_FileChooserMode_Dev mode,
|
| const PP_Var& accept_mime_types) {
|
| if (mode != PP_FILECHOOSERMODE_OPEN &&
|
| @@ -110,7 +110,7 @@ void PPB_FileChooser_Impl::StoreChosenFiles(
|
| #endif
|
|
|
| chosen_files_.push_back(make_scoped_refptr(
|
| - new PPB_FileRef_Impl(instance(), file_path)));
|
| + new PPB_FileRef_Impl(pp_instance(), file_path)));
|
| }
|
|
|
| RunCallback((chosen_files_.size() > 0) ? PP_OK : PP_ERROR_USERCANCEL);
|
| @@ -134,7 +134,8 @@ void PPB_FileChooser_Impl::RegisterCallback(
|
| DCHECK(!callback_.get() || callback_->completed());
|
|
|
| callback_ = new TrackedCompletionCallback(
|
| - instance()->module()->GetCallbackTracker(), pp_resource(), callback);
|
| + ResourceHelper::GetPluginModule(this)->GetCallbackTracker(),
|
| + pp_resource(), callback);
|
| }
|
|
|
| void PPB_FileChooser_Impl::RunCallback(int32_t result) {
|
| @@ -156,7 +157,7 @@ int32_t PPB_FileChooser_Impl::Show(const PP_CompletionCallback& callback) {
|
| params.acceptTypes = WebString::fromUTF8(accept_mime_types_);
|
| params.directory = false;
|
|
|
| - if (!instance()->delegate()->RunFileChooser(params,
|
| + if (!ResourceHelper::GetPluginDelegate(this)->RunFileChooser(params,
|
| new FileChooserCompletionImpl(this)))
|
| return PP_ERROR_FAILED;
|
|
|
|
|