OLD | NEW |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 | 206 |
207 MediaplayerHandler::~MediaplayerHandler() { | 207 MediaplayerHandler::~MediaplayerHandler() { |
208 } | 208 } |
209 | 209 |
210 DOMMessageHandler* MediaplayerHandler::Attach(DOMUI* dom_ui) { | 210 DOMMessageHandler* MediaplayerHandler::Attach(DOMUI* dom_ui) { |
211 // Create our favicon data source. | 211 // Create our favicon data source. |
212 BrowserThread::PostTask( | 212 BrowserThread::PostTask( |
213 BrowserThread::IO, FROM_HERE, | 213 BrowserThread::IO, FROM_HERE, |
214 NewRunnableMethod( | 214 NewRunnableMethod( |
215 Singleton<ChromeURLDataManager>::get(), | 215 ChromeURLDataManager::GetInstance(), |
216 &ChromeURLDataManager::AddDataSource, | 216 &ChromeURLDataManager::AddDataSource, |
217 make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); | 217 make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); |
218 | 218 |
219 return DOMMessageHandler::Attach(dom_ui); | 219 return DOMMessageHandler::Attach(dom_ui); |
220 } | 220 } |
221 | 221 |
222 void MediaplayerHandler::Init(bool is_playlist, TabContents* contents) { | 222 void MediaplayerHandler::Init(bool is_playlist, TabContents* contents) { |
223 MediaPlayer* player = MediaPlayer::Get(); | 223 MediaPlayer* player = MediaPlayer::Get(); |
224 if (!is_playlist) { | 224 if (!is_playlist) { |
225 player->SetNewHandler(this, contents); | 225 player->SetNewHandler(this, contents); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 handler->Init(false, contents); | 603 handler->Init(false, contents); |
604 } | 604 } |
605 | 605 |
606 MediaplayerUIHTMLSource* html_source = | 606 MediaplayerUIHTMLSource* html_source = |
607 new MediaplayerUIHTMLSource(is_playlist); | 607 new MediaplayerUIHTMLSource(is_playlist); |
608 | 608 |
609 // Set up the chrome://mediaplayer/ source. | 609 // Set up the chrome://mediaplayer/ source. |
610 BrowserThread::PostTask( | 610 BrowserThread::PostTask( |
611 BrowserThread::IO, FROM_HERE, | 611 BrowserThread::IO, FROM_HERE, |
612 NewRunnableMethod( | 612 NewRunnableMethod( |
613 Singleton<ChromeURLDataManager>::get(), | 613 ChromeURLDataManager::GetInstance(), |
614 &ChromeURLDataManager::AddDataSource, | 614 &ChromeURLDataManager::AddDataSource, |
615 make_scoped_refptr(html_source))); | 615 make_scoped_refptr(html_source))); |
616 } | 616 } |
OLD | NEW |