diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_plugin_api.h | 12 | ||||
-rw-r--r-- | chrome/common/plugin_messages_internal.h | 9 |
2 files changed, 18 insertions, 3 deletions
diff --git a/chrome/common/chrome_plugin_api.h b/chrome/common/chrome_plugin_api.h index c10985a..d30357c 100644 --- a/chrome/common/chrome_plugin_api.h +++ b/chrome/common/chrome_plugin_api.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -30,7 +30,7 @@ extern "C" { // The current version of the API, used by the 'version' field of CPPluginFuncs // and CPBrowserFuncs. #define CP_MAJOR_VERSION 0 -#define CP_MINOR_VERSION 10 +#define CP_MINOR_VERSION 11 #define CP_VERSION ((CP_MAJOR_VERSION << 8) | (CP_MINOR_VERSION)) #define CP_GET_MAJOR_VERSION(version) ((version & 0xff00) >> 8) @@ -445,6 +445,13 @@ typedef CPError (STDCALL *CPB_GetDragDataFunc)( typedef CPError (STDCALL *CPB_SetDropEffectFunc)( CPID id, CPBrowsingContext context, struct NPObject* event, int effect); +// For drag type "Files", the drag data returned by CPB_GetDragDataFunc() is a +// backspace delimited list of file paths. Use this routine to pass that data +// to the browser process to verify that the renderer has permission to access +// the files. Returns CPERR_SUCCESS if access is allowed. +typedef CPError (STDCALL *CPB_AllowFileDropFunc)( + CPID id, CPBrowsingContext context, const char* file_drag_data); + // Function table for issuing requests using via the other side's network stack. // For the plugin, this functions deal with issuing requests through the // browser. For the browser, these functions deal with allowing the plugin to @@ -521,6 +528,7 @@ typedef struct _CPBrowserFuncs { CPB_OpenFileDialogFunc open_file_dialog; CPB_GetDragDataFunc get_drag_data; CPB_SetDropEffectFunc set_drop_effect; + CPB_AllowFileDropFunc allow_file_drop; } CPBrowserFuncs; diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h index 8631973..18152d9 100644 --- a/chrome/common/plugin_messages_internal.h +++ b/chrome/common/plugin_messages_internal.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -73,6 +73,13 @@ IPC_BEGIN_MESSAGES(PluginProcessHost) GURL /* url */, std::string /* cookies */) + // Used by the plugin process to verify that its renderer |process_id| has + // permission to access the given |files|. + IPC_SYNC_MESSAGE_CONTROL2_1(PluginProcessHostMsg_AccessFiles, + int /* process_id */, + std::vector<std::string> /* files */, + bool /* allowed */) + // Get the list of proxies to use for |url|, as a semicolon delimited list // of "<TYPE> <HOST>:<PORT>" | "DIRECT". See also ViewHostMsg_ResolveProxy // which does the same thing. |