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

Unified Diff: chrome/renderer/printing/print_web_view_helper.h

Issue 23855002: Fixing spreadsheets printing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/renderer/printing/print_web_view_helper.h
diff --git a/chrome/renderer/printing/print_web_view_helper.h b/chrome/renderer/printing/print_web_view_helper.h
index d10db9792522392b6314f7dda406db298532bf59..56d1ecdc6584b8cd90dbfde1e505272cfe6cc076 100644
--- a/chrome/renderer/printing/print_web_view_helper.h
+++ b/chrome/renderer/printing/print_web_view_helper.h
@@ -10,6 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
+#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "content/public/renderer/render_view_observer.h"
#include "content/public/renderer/render_view_observer_tracker.h"
@@ -60,7 +61,8 @@ class FrameReference {
// of the document and creating a new WebView with the contents.
class PrintWebViewHelper
: public content::RenderViewObserver,
- public content::RenderViewObserverTracker<PrintWebViewHelper> {
+ public content::RenderViewObserverTracker<PrintWebViewHelper>,
+ public base::SupportsWeakPtr<PrintWebViewHelper> {
Lei Zhang 2013/09/03 20:07:26 A couple weeks ago, there was a "let's kill Suppor
Vitaly Buka (NO REVIEWS) 2013/09/04 01:49:49 Done.
public:
explicit PrintWebViewHelper(content::RenderView* render_view);
virtual ~PrintWebViewHelper();
@@ -112,6 +114,8 @@ class PrintWebViewHelper
// RenderViewObserver implementation.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void PrintPage(WebKit::WebFrame* frame, bool user_initiated) OVERRIDE;
+ virtual void DidStartLoading() OVERRIDE;
+ virtual void DidStopLoading() OVERRIDE;
// Message handlers ---------------------------------------------------------
@@ -326,6 +330,9 @@ class PrintWebViewHelper
// Scripted printing will be blocked for a limited amount of time.
void IncrementScriptedPrintCount();
+ // Shows scripted print preview when options from plugin are availible.
+ void ShowScriptedPrintPreview();
+
void RequestPrintPreview(PrintPreviewRequestType type);
// Checks whether print preview should continue or not.
@@ -478,6 +485,8 @@ class PrintWebViewHelper
bool print_node_in_progress_;
PrintPreviewContext print_preview_context_;
+ bool is_loading_;
+ bool is_scripted_preview_delayed_;
DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
};

Powered by Google App Engine
This is Rietveld 408576698