diff options
author | sverrir@google.com <sverrir@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 15:58:01 +0000 |
---|---|---|
committer | sverrir@google.com <sverrir@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 15:58:01 +0000 |
commit | 8227045e458705c27ca116a02fd7b9b9a75237ae (patch) | |
tree | 2e694fc454663eedc62b27e99aeef67d476a09ab /chrome/browser/tab_contents/tab_contents.cc | |
parent | b0fd9c1c6b3ccf0b436d38d181ab26100b3135a6 (diff) | |
download | chromium_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/tab_contents/tab_contents.cc')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index df84333..557d2a6 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -122,10 +122,6 @@ const int kJavascriptMessageExpectedDelay = 1000; const char kLinkDoctorBaseURL[] = "http://linkhelp.clients.google.com/tbproxy/lh/fixurl"; -// The printer icon in shell32.dll. That's a standard icon user will quickly -// recognize. -const int kShell32PrinterIcon = 17; - // The list of prefs we want to observe. const wchar_t* kPrefsToObserve[] = { prefs::kAlternateErrorPagesEnabled, @@ -1033,6 +1029,10 @@ bool TabContents::PrintNow() { return render_view_host()->PrintPages(); } +void TabContents::PrintingDone(int document_cookie, bool success) { + render_view_host()->PrintingDone(document_cookie, success); +} + bool TabContents::IsActiveEntry(int32 page_id) { NavigationEntry* active_entry = controller_.GetActiveEntry(); return (active_entry != NULL && |