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

Side by Side Diff: chrome_frame/npapi_url_request.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/npapi_url_request.h ('k') | no next file » | 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/npapi_url_request.h" 5 #include "chrome_frame/npapi_url_request.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/threading/platform_thread.h" 8 #include "base/threading/platform_thread.h"
9 #include "chrome_frame/np_browser_functions.h" 9 #include "chrome_frame/np_browser_functions.h"
10 #include "chrome_frame/np_utils.h" 10 #include "chrome_frame/np_utils.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 void NPAPIUrlRequestManager::UrlNotify(const char* url, NPReason reason, 411 void NPAPIUrlRequestManager::UrlNotify(const char* url, NPReason reason,
412 void* notify_data) { 412 void* notify_data) {
413 NPAPIUrlRequest* request = RequestFromNotifyData(notify_data); 413 NPAPIUrlRequest* request = RequestFromNotifyData(notify_data);
414 DCHECK(request != NULL); 414 DCHECK(request != NULL);
415 if (request) { 415 if (request) {
416 request->Stop(); 416 request->Stop();
417 request->Release(); 417 request->Release();
418 } 418 }
419 } 419 }
420 420
421 void NPAPIUrlRequestManager::UrlRedirectNotify(const char* url, int status,
422 void* notify_data) {
423 NPAPIUrlRequest* request = RequestFromNotifyData(notify_data);
424 if (request) {
425 delegate_->OnResponseStarted(request->id(), "", "", 0, base::Time(),
426 url, status);
427 } else {
428 NOTREACHED() << "Received unexpected redirect notification for url:"
429 << url;
430 }
431 }
432
421 scoped_refptr<NPAPIUrlRequest> NPAPIUrlRequestManager::LookupRequest( 433 scoped_refptr<NPAPIUrlRequest> NPAPIUrlRequestManager::LookupRequest(
422 int request_id) { 434 int request_id) {
423 RequestMap::iterator index = request_map_.find(request_id); 435 RequestMap::iterator index = request_map_.find(request_id);
424 if (index != request_map_.end()) 436 if (index != request_map_.end())
425 return index->second; 437 return index->second;
426 return NULL; 438 return NULL;
427 } 439 }
OLDNEW
« no previous file with comments | « chrome_frame/npapi_url_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698