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

Unified Diff: chrome/browser/ui/browser_list.cc

Issue 6930034: Print Preview: Print in the background. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_list.h ('k') | chrome/browser/ui/browser_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_list.cc
===================================================================
--- chrome/browser/ui/browser_list.cc (revision 84344)
+++ chrome/browser/ui/browser_list.cc (working copy)
@@ -10,6 +10,7 @@
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
+#include "chrome/browser/printing/background_printing_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_window.h"
#include "content/browser/renderer_host/render_process_host.h"
@@ -171,6 +172,10 @@
Browser::FEATURE_NONE, match_types);
}
+printing::BackgroundPrintingManager* GetBackgroundPrintingManager() {
+ return g_browser_process->background_printing_manager();
+}
+
} // namespace
BrowserList::BrowserVector BrowserList::browsers_;
@@ -621,6 +626,7 @@
TabContentsIterator::TabContentsIterator()
: browser_iterator_(BrowserList::begin()),
web_view_index_(-1),
+ bg_printing_iterator_(GetBackgroundPrintingManager()->begin()),
cur_(NULL) {
Advance();
}
@@ -647,6 +653,13 @@
return;
}
}
+ // If no more TabContents from Browsers, check the BackgroundPrintingManager.
+ while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) {
+ cur_ = *bg_printing_iterator_;
+ CHECK(cur_);
+ ++bg_printing_iterator_;
+ return;
+ }
// Reached the end - no more TabContents.
cur_ = NULL;
}
« no previous file with comments | « chrome/browser/ui/browser_list.h ('k') | chrome/browser/ui/browser_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698