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

Side by Side Diff: components/pdf/browser/pdf_web_contents_helper.cc

Issue 554893002: [WORK_IN_PROGRESS] PDF::Save() fix for out-of-process-pdf. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with print dialog fix (aura only) Created 6 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/pdf/renderer/pepper_pdf_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/pdf/browser/pdf_web_contents_helper.h" 5 #include "components/pdf/browser/pdf_web_contents_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/pdf/browser/open_pdf_in_reader_prompt_client.h" 9 #include "components/pdf/browser/open_pdf_in_reader_prompt_client.h"
10 #include "components/pdf/browser/pdf_web_contents_helper_client.h" 10 #include "components/pdf/browser/pdf_web_contents_helper_client.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void PDFWebContentsHelper::UpdateLocationBar() { 68 void PDFWebContentsHelper::UpdateLocationBar() {
69 client_->UpdateLocationBar(web_contents()); 69 client_->UpdateLocationBar(web_contents());
70 } 70 }
71 71
72 void PDFWebContentsHelper::OnHasUnsupportedFeature() { 72 void PDFWebContentsHelper::OnHasUnsupportedFeature() {
73 client_->OnPDFHasUnsupportedFeature(web_contents()); 73 client_->OnPDFHasUnsupportedFeature(web_contents());
74 } 74 }
75 75
76 void PDFWebContentsHelper::OnSaveURLAs(const GURL& url, 76 void PDFWebContentsHelper::OnSaveURLAs(const GURL& url,
77 const content::Referrer& referrer) { 77 const content::Referrer& referrer) {
78 //CHECK(0);
78 client_->OnSaveURL(web_contents()); 79 client_->OnSaveURL(web_contents());
79 web_contents()->SaveFrame(url, referrer); 80 web_contents()->SaveFrame(url, referrer);
80 } 81 }
81 82
82 void PDFWebContentsHelper::OnUpdateContentRestrictions( 83 void PDFWebContentsHelper::OnUpdateContentRestrictions(
83 int content_restrictions) { 84 int content_restrictions) {
84 client_->UpdateContentRestrictions(web_contents(), content_restrictions); 85 client_->UpdateContentRestrictions(web_contents(), content_restrictions);
85 } 86 }
86 87
87 void PDFWebContentsHelper::OnModalPromptForPasswordClosed( 88 void PDFWebContentsHelper::OnModalPromptForPasswordClosed(
(...skipping 10 matching lines...) Expand all
98 IPC::Message* reply_message) { 99 IPC::Message* reply_message) {
99 base::Callback<void(bool, const base::string16&)> callback = 100 base::Callback<void(bool, const base::string16&)> callback =
100 base::Bind(&PDFWebContentsHelper::OnModalPromptForPasswordClosed, 101 base::Bind(&PDFWebContentsHelper::OnModalPromptForPasswordClosed,
101 base::Unretained(this), 102 base::Unretained(this),
102 reply_message); 103 reply_message);
103 client_->OnShowPDFPasswordDialog( 104 client_->OnShowPDFPasswordDialog(
104 web_contents(), base::UTF8ToUTF16(prompt), callback); 105 web_contents(), base::UTF8ToUTF16(prompt), callback);
105 } 106 }
106 107
107 } // namespace pdf 108 } // namespace pdf
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/pdf/renderer/pepper_pdf_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698