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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
« no previous file with comments | « chrome/browser/dom_ui/keyboard_ui.cc ('k') | chrome/browser/dom_ui/most_visited_handler.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 (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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/keyboard_ui.cc ('k') | chrome/browser/dom_ui/most_visited_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698