| 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" | |
| 11 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 12 #include "base/singleton.h" | 11 #include "base/singleton.h" |
| 13 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
| 14 #include "base/values.h" | 13 #include "base/values.h" |
| 15 #include "chrome/browser/browser_thread.h" | 14 #include "chrome/browser/browser_thread.h" |
| 16 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 15 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 17 #include "chrome/browser/dom_ui/dom_ui_theme_source.h" | 16 #include "chrome/browser/dom_ui/dom_ui_theme_source.h" |
| 18 #include "chrome/browser/dom_ui/print_preview_handler.h" | 17 #include "chrome/browser/dom_ui/print_preview_handler.h" |
| 19 #include "chrome/browser/tab_contents/tab_contents.h" | 18 #include "chrome/browser/tab_contents/tab_contents.h" |
| 20 #include "chrome/common/jstemplate_builder.h" | 19 #include "chrome/common/jstemplate_builder.h" |
| 21 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
| 22 | |
| 23 #include "grit/browser_resources.h" | 21 #include "grit/browser_resources.h" |
| 24 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
| 25 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
| 24 #include "ui/base/resource/resource_bundle.h" |
| 26 | 25 |
| 27 namespace { | 26 namespace { |
| 28 | 27 |
| 29 void SetLocalizedStrings(DictionaryValue* localized_strings) { | 28 void SetLocalizedStrings(DictionaryValue* localized_strings) { |
| 30 localized_strings->SetString(std::string("title"), | 29 localized_strings->SetString(std::string("title"), |
| 31 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_TITLE)); | 30 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_TITLE)); |
| 32 localized_strings->SetString(std::string("loading"), | 31 localized_strings->SetString(std::string("loading"), |
| 33 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_LOADING)); | 32 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_LOADING)); |
| 34 localized_strings->SetString(std::string("noPlugin"), | 33 localized_strings->SetString(std::string("noPlugin"), |
| 35 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_NO_PLUGIN)); | 34 l10n_util::GetStringUTF8(IDS_PRINT_PREVIEW_NO_PLUGIN)); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 BrowserThread::PostTask( | 139 BrowserThread::PostTask( |
| 141 BrowserThread::IO, FROM_HERE, | 140 BrowserThread::IO, FROM_HERE, |
| 142 NewRunnableMethod( | 141 NewRunnableMethod( |
| 143 ChromeURLDataManager::GetInstance(), | 142 ChromeURLDataManager::GetInstance(), |
| 144 &ChromeURLDataManager::AddDataSource, | 143 &ChromeURLDataManager::AddDataSource, |
| 145 make_scoped_refptr(new PrintPreviewUIHTMLSource()))); | 144 make_scoped_refptr(new PrintPreviewUIHTMLSource()))); |
| 146 } | 145 } |
| 147 | 146 |
| 148 PrintPreviewUI::~PrintPreviewUI() { | 147 PrintPreviewUI::~PrintPreviewUI() { |
| 149 } | 148 } |
| OLD | NEW |