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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 10534045: Add CreateTemporaryFile to PPB_Flash_File_ModuleLocal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months 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 | Annotate | Revision Log
OLDNEW
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_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 base::PlatformFileError PepperPluginDelegateImpl::GetDirContents( 971 base::PlatformFileError PepperPluginDelegateImpl::GetDirContents(
972 const ppapi::PepperFilePath& path, 972 const ppapi::PepperFilePath& path,
973 ppapi::DirContents* contents) { 973 ppapi::DirContents* contents) {
974 base::PlatformFileError error; 974 base::PlatformFileError error;
975 IPC::Message* msg = new PepperFileMsg_GetDirContents(path, contents, &error); 975 IPC::Message* msg = new PepperFileMsg_GetDirContents(path, contents, &error);
976 if (!render_view_->Send(msg)) 976 if (!render_view_->Send(msg))
977 return base::PLATFORM_FILE_ERROR_FAILED; 977 return base::PLATFORM_FILE_ERROR_FAILED;
978 return error; 978 return error;
979 } 979 }
980 980
981 base::PlatformFileError PepperPluginDelegateImpl::CreateTemporaryFile(
982 const ppapi::PepperFilePath& dir_path,
983 base::PlatformFile* file,
984 std::string* file_name) {
985 IPC::PlatformFileForTransit transit_file;
986 base::PlatformFileError error;
987 IPC::Message* msg = new PepperFileMsg_CreateTemporaryFile(
988 dir_path, &error, &transit_file, file_name);
989 if (!render_view_->Send(msg)) {
990 *file = base::kInvalidPlatformFileValue;
991 file_name->clear();
992 return base::PLATFORM_FILE_ERROR_FAILED;
993 }
994 *file = IPC::PlatformFileForTransitToPlatformFile(transit_file);
995 return error;
996 }
997
981 void PepperPluginDelegateImpl::SyncGetFileSystemPlatformPath( 998 void PepperPluginDelegateImpl::SyncGetFileSystemPlatformPath(
982 const GURL& url, FilePath* platform_path) { 999 const GURL& url, FilePath* platform_path) {
983 RenderThreadImpl::current()->Send(new FileSystemHostMsg_SyncGetPlatformPath( 1000 RenderThreadImpl::current()->Send(new FileSystemHostMsg_SyncGetPlatformPath(
984 url, platform_path)); 1001 url, platform_path));
985 } 1002 }
986 1003
987 scoped_refptr<base::MessageLoopProxy> 1004 scoped_refptr<base::MessageLoopProxy>
988 PepperPluginDelegateImpl::GetFileThreadMessageLoopProxy() { 1005 PepperPluginDelegateImpl::GetFileThreadMessageLoopProxy() {
989 return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(); 1006 return RenderThreadImpl::current()->GetFileThreadMessageLoopProxy();
990 } 1007 }
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 else 1708 else
1692 return render_view_->mouse_lock_dispatcher(); 1709 return render_view_->mouse_lock_dispatcher();
1693 } 1710 }
1694 1711
1695 webkit_glue::ClipboardClient* 1712 webkit_glue::ClipboardClient*
1696 PepperPluginDelegateImpl::CreateClipboardClient() const { 1713 PepperPluginDelegateImpl::CreateClipboardClient() const {
1697 return new RendererClipboardClient; 1714 return new RendererClipboardClient;
1698 } 1715 }
1699 1716
1700 } // namespace content 1717 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698