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

Side by Side Diff: plugin/npapi_host_control/win/stream_operation.h

Issue 149434: Avoid calling Abort from main thread on IBinding created on another thread. I... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
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 | « no previous file | plugin/npapi_host_control/win/stream_operation.cc » ('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 2009, Google Inc. All rights reserved. 1 // Copyright 2009, Google Inc. All rights reserved.
2 // Portions of this file were adapted from the Mozilla project. 2 // Portions of this file were adapted from the Mozilla project.
3 // See https://developer.mozilla.org/en/ActiveX_Control_for_Hosting_Netscape_Plu g-ins_in_IE 3 // See https://developer.mozilla.org/en/ActiveX_Control_for_Hosting_Netscape_Plu g-ins_in_IE
4 /* ***** BEGIN LICENSE BLOCK ***** 4 /* ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Assign/Retrieve the opaque NPAPI-provided callback data for the 115 // Assign/Retrieve the opaque NPAPI-provided callback data for the
116 // stream-operation. 116 // stream-operation.
117 void SetNotifyData(void *notify_data) { 117 void SetNotifyData(void *notify_data) {
118 notify_data_ = notify_data; 118 notify_data_ = notify_data;
119 } 119 }
120 120
121 void* GetNotifyData() { 121 void* GetNotifyData() {
122 return notify_data_; 122 return notify_data_;
123 } 123 }
124 124
125 // Call to request that the streaming operation terminate early. After this 125 // Call to request that the streaming operation terminate early. As soon as
126 // has been called, no further data notifications will take place. The next, 126 // the streaming thread sees the request has been cancelled, it aborts its
127 // and last notification will be through 127 // binding.
128 // IBindStatusCallback::OnStopBinding(...).
129 HRESULT RequestCancellation(); 128 HRESULT RequestCancellation();
130 129
131 BEGIN_COM_MAP(StreamOperation) 130 BEGIN_COM_MAP(StreamOperation)
132 COM_INTERFACE_ENTRY(IBindStatusCallback) 131 COM_INTERFACE_ENTRY(IBindStatusCallback)
133 END_COM_MAP() 132 END_COM_MAP()
134 133
135 // To allow interaction with non-thread-safe NPAPI plug-in modules, the 134 // To allow interaction with non-thread-safe NPAPI plug-in modules, the
136 // streaming code uses Windows message pumps to serialize the interactions 135 // streaming code uses Windows message pumps to serialize the interactions
137 // calling back into the plug-in on the thread in which the plug-in resides. 136 // calling back into the plug-in on the thread in which the plug-in resides.
138 // When information about the state of the streaming request is provided 137 // When information about the state of the streaming request is provided
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Value used to indicate the streaming operation should stop processing 261 // Value used to indicate the streaming operation should stop processing
263 // input data. 262 // input data.
264 bool cancel_requested_; 263 bool cancel_requested_;
265 264
266 static unsigned int __stdcall WorkerProc(void *worker_arguments); 265 static unsigned int __stdcall WorkerProc(void *worker_arguments);
267 266
268 DISALLOW_COPY_AND_ASSIGN(StreamOperation); 267 DISALLOW_COPY_AND_ASSIGN(StreamOperation);
269 }; 268 };
270 269
271 #endif // O3D_PLUGIN_NPAPI_HOST_CONTROL_WIN_STREAM_OPERATION_H_ 270 #endif // O3D_PLUGIN_NPAPI_HOST_CONTROL_WIN_STREAM_OPERATION_H_
OLDNEW
« no previous file with comments | « no previous file | plugin/npapi_host_control/win/stream_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698