Index: chrome/browser/printing/print_view_manager.h |
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h |
index 196dae0ddbf23c7c5f763aa7f17c95243a7ea9eb..4db11387efa5e20f8cf7d18bdf8f99ba3c2dd2d8 100644 |
--- a/chrome/browser/printing/print_view_manager.h |
+++ b/chrome/browser/printing/print_view_manager.h |
@@ -7,6 +7,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/string16.h" |
+#include "chrome/browser/prefs/pref_member.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_contents_observer.h" |
@@ -17,6 +18,7 @@ struct PrintHostMsg_DidPrintPage_Params; |
namespace content { |
class RenderProcessHost; |
+class RenderViewHost; |
} |
namespace printing { |
@@ -69,8 +71,8 @@ class PrintViewManager : public content::NotificationObserver, |
// renderer in the case of scripted print preview. |
void PrintPreviewDone(); |
- // Whether to block scripted printing or not. |
- void SetScriptedPrintingBlocked(bool blocked); |
+ // Whether to block scripted printing for our tab or not. |
+ void UpdateScriptedPrintingBlocked(); |
// Sets |observer| as the current PrintViewManagerObserver. Pass in NULL to |
// remove the current observer. |observer| may always be NULL, but |observer_| |
@@ -86,6 +88,10 @@ class PrintViewManager : public content::NotificationObserver, |
const content::NotificationDetails& details) OVERRIDE; |
// content::WebContentsObserver implementation. |
+ virtual void DidStartLoading( |
+ content::RenderViewHost* render_view_host) OVERRIDE; |
+ |
+ // content::WebContentsObserver implementation. |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
// Terminates or cancels the print job if one was pending. |
@@ -203,6 +209,12 @@ class PrintViewManager : public content::NotificationObserver, |
// Keeps track of the pending callback during scripted print preview. |
content::RenderProcessHost* scripted_print_preview_rph_; |
+ // Whether printing is enabled. |
+ BooleanPrefMember printing_enabled_; |
+ |
+ // Whether our tab content is in blocked state. |
+ bool tab_content_blocked_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PrintViewManager); |
}; |