| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/printing/print_view_manager.h" | 5 #include "chrome/browser/printing/print_view_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
| 23 #include "content/public/browser/notification_details.h" | 23 #include "content/public/browser/notification_details.h" |
| 24 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| 26 #include "printing/metafile.h" | 26 #include "printing/metafile.h" |
| 27 #include "printing/metafile_impl.h" | 27 #include "printing/metafile_impl.h" |
| 28 #include "printing/printed_document.h" | 28 #include "printing/printed_document.h" |
| 29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
| 30 | 30 |
| 31 using base::TimeDelta; | 31 using base::TimeDelta; |
| 32 using content::BrowserThread; |
| 32 | 33 |
| 33 namespace { | 34 namespace { |
| 34 | 35 |
| 35 string16 GenerateRenderSourceName(TabContents* tab_contents) { | 36 string16 GenerateRenderSourceName(TabContents* tab_contents) { |
| 36 string16 name(tab_contents->GetTitle()); | 37 string16 name(tab_contents->GetTitle()); |
| 37 if (name.empty()) | 38 if (name.empty()) |
| 38 name = l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE); | 39 name = l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE); |
| 39 return name; | 40 return name; |
| 40 } | 41 } |
| 41 | 42 |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 } | 527 } |
| 527 | 528 |
| 528 bool PrintViewManager::PrintNowInternal(IPC::Message* message) { | 529 bool PrintViewManager::PrintNowInternal(IPC::Message* message) { |
| 529 // Don't print / print preview interstitials. | 530 // Don't print / print preview interstitials. |
| 530 if (tab_contents()->showing_interstitial_page()) | 531 if (tab_contents()->showing_interstitial_page()) |
| 531 return false; | 532 return false; |
| 532 return Send(message); | 533 return Send(message); |
| 533 } | 534 } |
| 534 | 535 |
| 535 } // namespace printing | 536 } // namespace printing |
| OLD | NEW |