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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc

Issue 281803003: Add PPAPI_BEGIN_MESSAGE_MAP and PPAPI_END_MESSAGE_MAP to be used when dispatching IPCs using PPAPI_… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h " 5 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h" 9 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h"
10 #include "content/browser/renderer_host/pepper/quota_reservation.h" 10 #include "content/browser/renderer_host/pepper/quota_reservation.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 FROM_HERE, 94 FROM_HERE,
95 base::Bind(&GetFileSystemContextFromRenderId, render_process_id), 95 base::Bind(&GetFileSystemContextFromRenderId, render_process_id),
96 base::Bind(&PepperFileSystemBrowserHost::OpenExistingFileSystem, 96 base::Bind(&PepperFileSystemBrowserHost::OpenExistingFileSystem,
97 weak_factory_.GetWeakPtr(), 97 weak_factory_.GetWeakPtr(),
98 callback)); 98 callback));
99 } 99 }
100 100
101 int32_t PepperFileSystemBrowserHost::OnResourceMessageReceived( 101 int32_t PepperFileSystemBrowserHost::OnResourceMessageReceived(
102 const IPC::Message& msg, 102 const IPC::Message& msg,
103 ppapi::host::HostMessageContext* context) { 103 ppapi::host::HostMessageContext* context) {
104 IPC_BEGIN_MESSAGE_MAP(PepperFileSystemBrowserHost, msg) 104 PPAPI_BEGIN_MESSAGE_MAP(PepperFileSystemBrowserHost, msg)
105 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FileSystem_Open, OnHostMsgOpen) 105 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FileSystem_Open,
106 PPAPI_DISPATCH_HOST_RESOURCE_CALL( 106 OnHostMsgOpen)
107 PpapiHostMsg_FileSystem_InitIsolatedFileSystem, 107 PPAPI_DISPATCH_HOST_RESOURCE_CALL(
108 OnHostMsgInitIsolatedFileSystem) 108 PpapiHostMsg_FileSystem_InitIsolatedFileSystem,
109 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FileSystem_ReserveQuota, 109 OnHostMsgInitIsolatedFileSystem)
110 OnHostMsgReserveQuota) 110 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_FileSystem_ReserveQuota,
111 IPC_END_MESSAGE_MAP() 111 OnHostMsgReserveQuota)
112 PPAPI_END_MESSAGE_MAP()
112 return PP_ERROR_FAILED; 113 return PP_ERROR_FAILED;
113 } 114 }
114 115
115 bool PepperFileSystemBrowserHost::IsFileSystemHost() { return true; } 116 bool PepperFileSystemBrowserHost::IsFileSystemHost() { return true; }
116 117
117 void PepperFileSystemBrowserHost::OpenQuotaFile( 118 void PepperFileSystemBrowserHost::OpenQuotaFile(
118 PepperFileIOHost* file_io_host, 119 PepperFileIOHost* file_io_host,
119 const fileapi::FileSystemURL& url, 120 const fileapi::FileSystemURL& url,
120 const OpenQuotaFileCallback& callback) { 121 const OpenQuotaFileCallback& callback) {
121 int32_t id = file_io_host->pp_resource(); 122 int32_t id = file_io_host->pp_resource();
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 if (!IsAsciiAlpha(*it) && !IsAsciiDigit(*it) && *it != '.' && *it != '_' && 498 if (!IsAsciiAlpha(*it) && !IsAsciiDigit(*it) && *it != '.' && *it != '_' &&
498 *it != '-') { 499 *it != '-') {
499 LOG(WARNING) << "Failed to generate a plugin id."; 500 LOG(WARNING) << "Failed to generate a plugin id.";
500 return std::string(); 501 return std::string();
501 } 502 }
502 } 503 }
503 return output; 504 return output;
504 } 505 }
505 506
506 } // namespace content 507 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698