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

Side by Side Diff: chrome_frame/chrome_frame_npapi_entrypoints.cc

Issue 6223003: Add support in the ChromeFrame NPAPI plugin for receiving URL redirect notifi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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_frame/chrome_frame_npapi_entrypoints.h ('k') | chrome_frame/np_browser_functions.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_frame/chrome_frame_npapi_entrypoints.h" 5 #include "chrome_frame/chrome_frame_npapi_entrypoints.h"
6 #include "chrome_frame/chrome_frame_npapi.h" 6 #include "chrome_frame/chrome_frame_npapi.h"
7 7
8 #define NPAPI WINAPI 8 #define NPAPI WINAPI
9 9
10 // Plugin entry points. 10 // Plugin entry points.
(...skipping 19 matching lines...) Expand all
30 plugin_funcs->newstream = chrome_frame::NPP_NewStream; 30 plugin_funcs->newstream = chrome_frame::NPP_NewStream;
31 plugin_funcs->destroystream = chrome_frame::NPP_DestroyStream; 31 plugin_funcs->destroystream = chrome_frame::NPP_DestroyStream;
32 plugin_funcs->asfile = NULL; 32 plugin_funcs->asfile = NULL;
33 plugin_funcs->writeready = chrome_frame::NPP_WriteReady; 33 plugin_funcs->writeready = chrome_frame::NPP_WriteReady;
34 plugin_funcs->write = chrome_frame::NPP_Write; 34 plugin_funcs->write = chrome_frame::NPP_Write;
35 plugin_funcs->print = chrome_frame::NPP_Print; 35 plugin_funcs->print = chrome_frame::NPP_Print;
36 plugin_funcs->event = NULL; 36 plugin_funcs->event = NULL;
37 plugin_funcs->urlnotify = chrome_frame::NPP_URLNotify; 37 plugin_funcs->urlnotify = chrome_frame::NPP_URLNotify;
38 plugin_funcs->getvalue = chrome_frame::NPP_GetValue; 38 plugin_funcs->getvalue = chrome_frame::NPP_GetValue;
39 plugin_funcs->setvalue = chrome_frame::NPP_SetValue; 39 plugin_funcs->setvalue = chrome_frame::NPP_SetValue;
40 plugin_funcs->urlredirectnotify = chrome_frame::NPP_URLRedirectNotify;
40 return NPERR_NO_ERROR; 41 return NPERR_NO_ERROR;
41 } 42 }
42 43
43 void NPAPI NP_Shutdown() { 44 void NPAPI NP_Shutdown() {
44 DVLOG(1) << __FUNCTION__; 45 DVLOG(1) << __FUNCTION__;
45 46
46 npapi::UninitializeBrowserFunctions(); 47 npapi::UninitializeBrowserFunctions();
47 48
48 _pAtlModule->Unlock(); // matches Lock() inside NP_Initialize 49 _pAtlModule->Unlock(); // matches Lock() inside NP_Initialize
49 50
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 if (plugin_instance) { 188 if (plugin_instance) {
188 plugin_instance->UrlNotify(url, reason, notifyData); 189 plugin_instance->UrlNotify(url, reason, notifyData);
189 } 190 }
190 } 191 }
191 192
192 void NPP_Print(NPP instance, NPPrint* print_info) { 193 void NPP_Print(NPP instance, NPPrint* print_info) {
193 ChromeFrameNPAPI* plugin_instance = 194 ChromeFrameNPAPI* plugin_instance =
194 ChromeFrameNPAPI::ChromeFrameInstanceFromPluginInstance(instance); 195 ChromeFrameNPAPI::ChromeFrameInstanceFromPluginInstance(instance);
195 196
196 if (plugin_instance == NULL) { 197 if (plugin_instance == NULL) {
197 NOTREACHED(); 198 NOTREACHED() << "Failed to find plugin instance";
198 return; 199 return;
199 } 200 }
200 201
201 plugin_instance->Print(print_info); 202 plugin_instance->Print(print_info);
202 } 203 }
203 204
205 void NPP_URLRedirectNotify(NPP instance, const char* url, int status,
206 void* notify_data) {
207 ChromeFrameNPAPI* plugin_instance =
208 ChromeFrameNPAPI::ChromeFrameInstanceFromPluginInstance(instance);
209
210 if (plugin_instance == NULL) {
211 NOTREACHED() << "Failed to find plugin instance";
212 npapi::URLRedirectResponse(instance, notify_data, false);
213 return;
214 }
215 plugin_instance->URLRedirectNotify(url, status, notify_data);
216 }
217
204 } // namespace chrome_frame 218 } // namespace chrome_frame
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_npapi_entrypoints.h ('k') | chrome_frame/np_browser_functions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698