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

Side by Side Diff: chrome/browser/chrome_plugin_host.cc

Issue 159074: CPAPI (0.11) for gears drag drop.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/browser/child_process_security_policy.cc ('k') | chrome/browser/plugin_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "chrome/browser/chrome_plugin_host.h" 5 #include "chrome/browser/chrome_plugin_host.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 NOTREACHED() << "Should not be called in the browser process."; 538 NOTREACHED() << "Should not be called in the browser process.";
539 return CPERR_FAILURE; 539 return CPERR_FAILURE;
540 } 540 }
541 541
542 CPError STDCALL CPB_SetDropEffect( 542 CPError STDCALL CPB_SetDropEffect(
543 CPID id, CPBrowsingContext context, struct NPObject* event, int effect) { 543 CPID id, CPBrowsingContext context, struct NPObject* event, int effect) {
544 NOTREACHED() << "Should not be called in the browser process."; 544 NOTREACHED() << "Should not be called in the browser process.";
545 return CPERR_FAILURE; 545 return CPERR_FAILURE;
546 } 546 }
547 547
548 CPError STDCALL CPB_AllowFileDrop(
549 CPID id, CPBrowsingContext context, const char* file_drag_data) {
550 NOTREACHED() << "Should not be called in the browser process.";
551 return CPERR_FAILURE;
552 }
553
548 // 554 //
549 // Functions related to network interception 555 // Functions related to network interception
550 // 556 //
551 557
552 void STDCALL CPB_EnableRequestIntercept(CPID id, const char** schemes, 558 void STDCALL CPB_EnableRequestIntercept(CPID id, const char** schemes,
553 uint32 num_schemes) { 559 uint32 num_schemes) {
554 CHECK(ChromePluginLib::IsPluginThread()); 560 CHECK(ChromePluginLib::IsPluginThread());
555 ChromePluginLib* plugin = ChromePluginLib::FromCPID(id); 561 ChromePluginLib* plugin = ChromePluginLib::FromCPID(id);
556 CHECK(plugin); 562 CHECK(plugin);
557 563
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 browser_funcs.add_ui_command = CPB_AddUICommand; 787 browser_funcs.add_ui_command = CPB_AddUICommand;
782 browser_funcs.handle_command = CPB_HandleCommand; 788 browser_funcs.handle_command = CPB_HandleCommand;
783 789
784 browser_funcs.request_funcs = &request_funcs; 790 browser_funcs.request_funcs = &request_funcs;
785 browser_funcs.response_funcs = &response_funcs; 791 browser_funcs.response_funcs = &response_funcs;
786 browser_funcs.send_sync_message = CPB_SendSyncMessage; 792 browser_funcs.send_sync_message = CPB_SendSyncMessage;
787 browser_funcs.plugin_thread_async_call = CPB_PluginThreadAsyncCall; 793 browser_funcs.plugin_thread_async_call = CPB_PluginThreadAsyncCall;
788 browser_funcs.open_file_dialog = CPB_OpenFileDialog; 794 browser_funcs.open_file_dialog = CPB_OpenFileDialog;
789 browser_funcs.get_drag_data = CPB_GetDragData; 795 browser_funcs.get_drag_data = CPB_GetDragData;
790 browser_funcs.set_drop_effect = CPB_SetDropEffect; 796 browser_funcs.set_drop_effect = CPB_SetDropEffect;
797 browser_funcs.allow_file_drop = CPB_AllowFileDrop;
791 798
792 request_funcs.size = sizeof(request_funcs); 799 request_funcs.size = sizeof(request_funcs);
793 request_funcs.start_request = CPR_StartRequest; 800 request_funcs.start_request = CPR_StartRequest;
794 request_funcs.end_request = CPR_EndRequest; 801 request_funcs.end_request = CPR_EndRequest;
795 request_funcs.set_extra_request_headers = CPR_SetExtraRequestHeaders; 802 request_funcs.set_extra_request_headers = CPR_SetExtraRequestHeaders;
796 request_funcs.set_request_load_flags = CPR_SetRequestLoadFlags; 803 request_funcs.set_request_load_flags = CPR_SetRequestLoadFlags;
797 request_funcs.append_data_to_upload = CPR_AppendDataToUpload; 804 request_funcs.append_data_to_upload = CPR_AppendDataToUpload;
798 request_funcs.get_response_info = CPR_GetResponseInfo; 805 request_funcs.get_response_info = CPR_GetResponseInfo;
799 request_funcs.read = CPR_Read; 806 request_funcs.read = CPR_Read;
800 request_funcs.append_file_to_upload = CPR_AppendFileToUpload; 807 request_funcs.append_file_to_upload = CPR_AppendFileToUpload;
(...skipping 11 matching lines...) Expand all
812 void CPHandleCommand(int command, CPCommandInterface* data, 819 void CPHandleCommand(int command, CPCommandInterface* data,
813 CPBrowsingContext context) { 820 CPBrowsingContext context) {
814 // Sadly if we try and pass context through, we seem to break cl's little 821 // Sadly if we try and pass context through, we seem to break cl's little
815 // brain trying to compile the Tuple3 ctor. This cast works. 822 // brain trying to compile the Tuple3 ctor. This cast works.
816 int32 context_as_int32 = static_cast<int32>(context); 823 int32 context_as_int32 = static_cast<int32>(context);
817 // Plugins can only be accessed on the IO thread. 824 // Plugins can only be accessed on the IO thread.
818 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 825 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
819 NewRunnableFunction(PluginCommandHandler::HandleCommand, 826 NewRunnableFunction(PluginCommandHandler::HandleCommand,
820 command, data, context_as_int32)); 827 command, data, context_as_int32));
821 } 828 }
OLDNEW
« no previous file with comments | « chrome/browser/child_process_security_policy.cc ('k') | chrome/browser/plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698