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

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

Issue 2246373003: Fix the PDF download button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | components/pdf/browser/pdf_web_contents_helper.cc » ('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 #ifndef COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ 5 #ifndef COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_
6 #define COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ 6 #define COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 void ShowOpenInReaderPrompt( 39 void ShowOpenInReaderPrompt(
40 std::unique_ptr<OpenPDFInReaderPromptClient> prompt); 40 std::unique_ptr<OpenPDFInReaderPromptClient> prompt);
41 41
42 private: 42 private:
43 PDFWebContentsHelper(content::WebContents* web_contents, 43 PDFWebContentsHelper(content::WebContents* web_contents,
44 std::unique_ptr<PDFWebContentsHelperClient> client); 44 std::unique_ptr<PDFWebContentsHelperClient> client);
45 ~PDFWebContentsHelper() override; 45 ~PDFWebContentsHelper() override;
46 46
47 // content::WebContentsObserver overrides: 47 // content::WebContentsObserver overrides:
48 bool OnMessageReceived(const IPC::Message& message) override; 48 bool OnMessageReceived(const IPC::Message& message,
49 content::RenderFrameHost* render_frame_host) override;
49 void DidNavigateMainFrame( 50 void DidNavigateMainFrame(
50 const content::LoadCommittedDetails& details, 51 const content::LoadCommittedDetails& details,
51 const content::FrameNavigateParams& params) override; 52 const content::FrameNavigateParams& params) override;
52 53
53 // Internal helpers ---------------------------------------------------------- 54 // Internal helpers ----------------------------------------------------------
54 55
55 void UpdateLocationBar(); 56 void UpdateLocationBar();
56 57
57 // Message handlers. 58 // Message handlers.
58 void OnHasUnsupportedFeature(); 59 void OnHasUnsupportedFeature();
59 void OnSaveURLAs(const GURL& url, const content::Referrer& referrer); 60 void OnSaveURLAs(const GURL& url, const content::Referrer& referrer);
60 void OnUpdateContentRestrictions(int content_restrictions); 61 void OnUpdateContentRestrictions(int content_restrictions);
61 62
62 // The model for the confirmation prompt to open a PDF in Adobe Reader. 63 // The model for the confirmation prompt to open a PDF in Adobe Reader.
63 std::unique_ptr<OpenPDFInReaderPromptClient> open_in_reader_prompt_; 64 std::unique_ptr<OpenPDFInReaderPromptClient> open_in_reader_prompt_;
64 std::unique_ptr<PDFWebContentsHelperClient> client_; 65 std::unique_ptr<PDFWebContentsHelperClient> client_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper); 67 DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper);
67 }; 68 };
68 69
69 } // namespace pdf 70 } // namespace pdf
70 71
71 #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ 72 #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | components/pdf/browser/pdf_web_contents_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698