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

Side by Side Diff: chrome/browser/dom_ui/mediaplayer_ui.cc

Issue 5607004: net: Remove typedef net::URLRequestJob URLRequestJob; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 2 Created 10 years 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
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/browser/dom_ui/mediaplayer_ui.h" 5 #include "chrome/browser/dom_ui/mediaplayer_ui.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 #endif 536 #endif
537 mediaplayer_browser_->AddSelectedTabWithURL(GURL(kMediaplayerURL), 537 mediaplayer_browser_->AddSelectedTabWithURL(GURL(kMediaplayerURL),
538 PageTransition::LINK); 538 PageTransition::LINK);
539 mediaplayer_browser_->window()->SetBounds(gfx::Rect(kPopupLeft, 539 mediaplayer_browser_->window()->SetBounds(gfx::Rect(kPopupLeft,
540 kPopupTop, 540 kPopupTop,
541 kPopupWidth, 541 kPopupWidth,
542 kPopupHeight)); 542 kPopupHeight));
543 mediaplayer_browser_->window()->Show(); 543 mediaplayer_browser_->window()->Show();
544 } 544 }
545 545
546 URLRequestJob* MediaPlayer::MaybeIntercept(net::URLRequest* request) { 546 net::URLRequestJob* MediaPlayer::MaybeIntercept(net::URLRequest* request) {
547 // Don't attempt to intercept here as we want to wait until the mime 547 // Don't attempt to intercept here as we want to wait until the mime
548 // type is fully determined. 548 // type is fully determined.
549 return NULL; 549 return NULL;
550 } 550 }
551 551
552 // This is the list of mime types currently supported by the Google 552 // This is the list of mime types currently supported by the Google
553 // Document Viewer. 553 // Document Viewer.
554 static const char* const supported_mime_type_list[] = { 554 static const char* const supported_mime_type_list[] = {
555 "audio/mpeg", 555 "audio/mpeg",
556 "video/mp4", 556 "video/mp4",
557 "audio/mp3" 557 "audio/mp3"
558 }; 558 };
559 559
560 URLRequestJob* MediaPlayer::MaybeInterceptResponse( 560 net::URLRequestJob* MediaPlayer::MaybeInterceptResponse(
561 net::URLRequest* request) { 561 net::URLRequest* request) {
562 // Do not intercept this request if it is a download. 562 // Do not intercept this request if it is a download.
563 if (request->load_flags() & net::LOAD_IS_DOWNLOAD) { 563 if (request->load_flags() & net::LOAD_IS_DOWNLOAD) {
564 return NULL; 564 return NULL;
565 } 565 }
566 566
567 std::string mime_type; 567 std::string mime_type;
568 request->GetMimeType(&mime_type); 568 request->GetMimeType(&mime_type);
569 // If it is in our list of known URLs, enqueue the url then 569 // If it is in our list of known URLs, enqueue the url then
570 // Cancel the request so the mediaplayer can handle it when 570 // Cancel the request so the mediaplayer can handle it when
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 new MediaplayerUIHTMLSource(is_playlist); 612 new MediaplayerUIHTMLSource(is_playlist);
613 613
614 // Set up the chrome://mediaplayer/ source. 614 // Set up the chrome://mediaplayer/ source.
615 BrowserThread::PostTask( 615 BrowserThread::PostTask(
616 BrowserThread::IO, FROM_HERE, 616 BrowserThread::IO, FROM_HERE,
617 NewRunnableMethod( 617 NewRunnableMethod(
618 ChromeURLDataManager::GetInstance(), 618 ChromeURLDataManager::GetInstance(),
619 &ChromeURLDataManager::AddDataSource, 619 &ChromeURLDataManager::AddDataSource,
620 make_scoped_refptr(html_source))); 620 make_scoped_refptr(html_source)));
621 } 621 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/mediaplayer_ui.h ('k') | chrome/browser/extensions/autoupdate_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698