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

Unified Diff: chrome/browser/task_manager/tab_contents_resource_provider.cc

Issue 22577010: Printing: Add a basic printing mode without print preview and cloud print. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 4 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
Index: chrome/browser/task_manager/tab_contents_resource_provider.cc
diff --git a/chrome/browser/task_manager/tab_contents_resource_provider.cc b/chrome/browser/task_manager/tab_contents_resource_provider.cc
index bce027d6a041b72912f13c53e5b76c7bd4b1e54d..87659b145bb8682186b87a28b1c67e3f443c1335 100644
--- a/chrome/browser/task_manager/tab_contents_resource_provider.cc
+++ b/chrome/browser/task_manager/tab_contents_resource_provider.cc
@@ -10,7 +10,6 @@
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/prerender/prerender_manager_factory.h"
-#include "chrome/browser/printing/background_printing_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search/instant_service.h"
@@ -34,6 +33,10 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
+#if defined(ENABLE_FULL_PRINTING)
+#include "chrome/browser/printing/background_printing_manager.h"
+#endif
+
using content::WebContents;
using extensions::Extension;
@@ -49,9 +52,13 @@ bool IsContentsPrerendering(WebContents* web_contents) {
}
bool IsContentsBackgroundPrinted(WebContents* web_contents) {
+#if defined(ENABLE_FULL_PRINTING)
printing::BackgroundPrintingManager* printing_manager =
g_browser_process->background_printing_manager();
return printing_manager->HasPrintPreviewDialog(web_contents);
+#else
+ return false;
+#endif
}
} // namespace
@@ -230,6 +237,7 @@ void TabContentsResourceProvider::StartUpdating() {
Add(instant_service->GetNTPContents());
}
+#if defined(ENABLE_FULL_PRINTING)
// Add all the pages being background printed.
printing::BackgroundPrintingManager* printing_manager =
g_browser_process->background_printing_manager();
@@ -238,6 +246,7 @@ void TabContentsResourceProvider::StartUpdating() {
i != printing_manager->end(); ++i) {
Add(*i);
}
+#endif
// Then we register for notifications to get new web contents.
registrar_.Add(this, content::NOTIFICATION_WEB_CONTENTS_CONNECTED,
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/browser/ui/apps/chrome_shell_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698