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

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

Issue 160211: Merge 21437 - CPAPI (0.11) for gears drag drop.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/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')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/chrome_plugin_host.cc:r21437
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 NOTREACHED() << "Should not be called in the browser process."; 539 NOTREACHED() << "Should not be called in the browser process.";
540 return CPERR_FAILURE; 540 return CPERR_FAILURE;
541 } 541 }
542 542
543 CPError STDCALL CPB_SetDropEffect( 543 CPError STDCALL CPB_SetDropEffect(
544 CPID id, CPBrowsingContext context, struct NPObject* event, int effect) { 544 CPID id, CPBrowsingContext context, struct NPObject* event, int effect) {
545 NOTREACHED() << "Should not be called in the browser process."; 545 NOTREACHED() << "Should not be called in the browser process.";
546 return CPERR_FAILURE; 546 return CPERR_FAILURE;
547 } 547 }
548 548
549 CPError STDCALL CPB_AllowFileDrop(
550 CPID id, CPBrowsingContext context, const char* file_drag_data) {
551 NOTREACHED() << "Should not be called in the browser process.";
552 return CPERR_FAILURE;
553 }
554
549 // 555 //
550 // Functions related to network interception 556 // Functions related to network interception
551 // 557 //
552 558
553 void STDCALL CPB_EnableRequestIntercept(CPID id, const char** schemes, 559 void STDCALL CPB_EnableRequestIntercept(CPID id, const char** schemes,
554 uint32 num_schemes) { 560 uint32 num_schemes) {
555 CHECK(ChromePluginLib::IsPluginThread()); 561 CHECK(ChromePluginLib::IsPluginThread());
556 ChromePluginLib* plugin = ChromePluginLib::FromCPID(id); 562 ChromePluginLib* plugin = ChromePluginLib::FromCPID(id);
557 CHECK(plugin); 563 CHECK(plugin);
558 564
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 browser_funcs.add_ui_command = CPB_AddUICommand; 788 browser_funcs.add_ui_command = CPB_AddUICommand;
783 browser_funcs.handle_command = CPB_HandleCommand; 789 browser_funcs.handle_command = CPB_HandleCommand;
784 790
785 browser_funcs.request_funcs = &request_funcs; 791 browser_funcs.request_funcs = &request_funcs;
786 browser_funcs.response_funcs = &response_funcs; 792 browser_funcs.response_funcs = &response_funcs;
787 browser_funcs.send_sync_message = CPB_SendSyncMessage; 793 browser_funcs.send_sync_message = CPB_SendSyncMessage;
788 browser_funcs.plugin_thread_async_call = CPB_PluginThreadAsyncCall; 794 browser_funcs.plugin_thread_async_call = CPB_PluginThreadAsyncCall;
789 browser_funcs.open_file_dialog = CPB_OpenFileDialog; 795 browser_funcs.open_file_dialog = CPB_OpenFileDialog;
790 browser_funcs.get_drag_data = CPB_GetDragData; 796 browser_funcs.get_drag_data = CPB_GetDragData;
791 browser_funcs.set_drop_effect = CPB_SetDropEffect; 797 browser_funcs.set_drop_effect = CPB_SetDropEffect;
798 browser_funcs.allow_file_drop = CPB_AllowFileDrop;
792 799
793 request_funcs.size = sizeof(request_funcs); 800 request_funcs.size = sizeof(request_funcs);
794 request_funcs.start_request = CPR_StartRequest; 801 request_funcs.start_request = CPR_StartRequest;
795 request_funcs.end_request = CPR_EndRequest; 802 request_funcs.end_request = CPR_EndRequest;
796 request_funcs.set_extra_request_headers = CPR_SetExtraRequestHeaders; 803 request_funcs.set_extra_request_headers = CPR_SetExtraRequestHeaders;
797 request_funcs.set_request_load_flags = CPR_SetRequestLoadFlags; 804 request_funcs.set_request_load_flags = CPR_SetRequestLoadFlags;
798 request_funcs.append_data_to_upload = CPR_AppendDataToUpload; 805 request_funcs.append_data_to_upload = CPR_AppendDataToUpload;
799 request_funcs.get_response_info = CPR_GetResponseInfo; 806 request_funcs.get_response_info = CPR_GetResponseInfo;
800 request_funcs.read = CPR_Read; 807 request_funcs.read = CPR_Read;
801 request_funcs.append_file_to_upload = CPR_AppendFileToUpload; 808 request_funcs.append_file_to_upload = CPR_AppendFileToUpload;
(...skipping 11 matching lines...) Expand all
813 void CPHandleCommand(int command, CPCommandInterface* data, 820 void CPHandleCommand(int command, CPCommandInterface* data,
814 CPBrowsingContext context) { 821 CPBrowsingContext context) {
815 // Sadly if we try and pass context through, we seem to break cl's little 822 // Sadly if we try and pass context through, we seem to break cl's little
816 // brain trying to compile the Tuple3 ctor. This cast works. 823 // brain trying to compile the Tuple3 ctor. This cast works.
817 int32 context_as_int32 = static_cast<int32>(context); 824 int32 context_as_int32 = static_cast<int32>(context);
818 // Plugins can only be accessed on the IO thread. 825 // Plugins can only be accessed on the IO thread.
819 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 826 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
820 NewRunnableFunction(PluginCommandHandler::HandleCommand, 827 NewRunnableFunction(PluginCommandHandler::HandleCommand,
821 command, data, context_as_int32)); 828 command, data, context_as_int32));
822 } 829 }
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