| 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/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 Loading... |
| 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 } |
| OLD | NEW |