summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorsverrir@google.com <sverrir@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 15:58:01 +0000
committersverrir@google.com <sverrir@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 15:58:01 +0000
commit8227045e458705c27ca116a02fd7b9b9a75237ae (patch)
tree2e694fc454663eedc62b27e99aeef67d476a09ab /chrome/browser/renderer_host
parentb0fd9c1c6b3ccf0b436d38d181ab26100b3135a6 (diff)
downloadchromium_src-8227045e458705c27ca116a02fd7b9b9a75237ae.zip
chromium_src-8227045e458705c27ca116a02fd7b9b9a75237ae.tar.gz
chromium_src-8227045e458705c27ca116a02fd7b9b9a75237ae.tar.bz2
Add Print Selection support to Chrome. This change is fairly involved since this means that the printing is done async instead of the fully synchronous mode the normal full page printing is.
This means we create an in memory copy of the selected text for printing. This is the next step to move to fully async printing with print frame support. This change also removes the print on demand functionality that was no longer used. BUG=http://crbug.com/1682 TEST=The print dialog on Windows now contains an option to print selection only. Test that with various pages and various selections. Review URL: http://codereview.chromium.org/125082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc4
-rw-r--r--chrome/browser/renderer_host/render_view_host.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index ead11b8..6b46069 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -367,6 +367,10 @@ bool RenderViewHost::PrintPages() {
return Send(new ViewMsg_PrintPages(routing_id()));
}
+void RenderViewHost::PrintingDone(int document_cookie, bool success) {
+ Send(new ViewMsg_PrintingDone(routing_id(), document_cookie, success));
+}
+
void RenderViewHost::StartFinding(int request_id,
const string16& search_text,
bool forward,
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index a14af37..1fb5900 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -181,11 +181,13 @@ class RenderViewHost : public RenderWidgetHost {
// Stops the current load.
void Stop();
-
// Asks the renderer to "render" printed pages and initiate printing on our
// behalf.
bool PrintPages();
+ // Notify renderer of success/failure of print job.
+ void PrintingDone(int document_cookie, bool success);
+
// Start looking for a string within the content of the page, with the
// specified options.
void StartFinding(int request_id,