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

Side by Side Diff: chrome/browser/dom_ui/print_preview_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/plugins_ui.cc ('k') | chrome/browser/dom_ui/remoting_ui.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/print_preview_ui.h" 5 #include "chrome/browser/dom_ui/print_preview_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 PrintPreviewUI::PrintPreviewUI(TabContents* contents) : DOMUI(contents) { 134 PrintPreviewUI::PrintPreviewUI(TabContents* contents) : DOMUI(contents) {
135 // PrintPreviewUI owns |handler|. 135 // PrintPreviewUI owns |handler|.
136 PrintPreviewHandler* handler = new PrintPreviewHandler(); 136 PrintPreviewHandler* handler = new PrintPreviewHandler();
137 AddMessageHandler(handler->Attach(this)); 137 AddMessageHandler(handler->Attach(this));
138 138
139 // Set up the chrome://print/ source. 139 // Set up the chrome://print/ source.
140 BrowserThread::PostTask( 140 BrowserThread::PostTask(
141 BrowserThread::IO, FROM_HERE, 141 BrowserThread::IO, FROM_HERE,
142 NewRunnableMethod( 142 NewRunnableMethod(
143 Singleton<ChromeURLDataManager>::get(), 143 ChromeURLDataManager::GetInstance(),
144 &ChromeURLDataManager::AddDataSource, 144 &ChromeURLDataManager::AddDataSource,
145 make_scoped_refptr(new PrintPreviewUIHTMLSource()))); 145 make_scoped_refptr(new PrintPreviewUIHTMLSource())));
146 } 146 }
147 147
148 PrintPreviewUI::~PrintPreviewUI() { 148 PrintPreviewUI::~PrintPreviewUI() {
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/plugins_ui.cc ('k') | chrome/browser/dom_ui/remoting_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698