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

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

Issue 2252573003: Add PDFExtensionTest.DownloadPDFButton Base URL: https://chromium.googlesource.com/chromium/src.git@bug_638087
Patch Set: missing changes 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
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 21 matching lines...) Expand all
32 content::WebContents* contents, 32 content::WebContents* contents,
33 std::unique_ptr<PDFWebContentsHelperClient> client); 33 std::unique_ptr<PDFWebContentsHelperClient> client);
34 34
35 OpenPDFInReaderPromptClient* open_in_reader_prompt() const { 35 OpenPDFInReaderPromptClient* open_in_reader_prompt() const {
36 return open_in_reader_prompt_.get(); 36 return open_in_reader_prompt_.get();
37 } 37 }
38 38
39 void ShowOpenInReaderPrompt( 39 void ShowOpenInReaderPrompt(
40 std::unique_ptr<OpenPDFInReaderPromptClient> prompt); 40 std::unique_ptr<OpenPDFInReaderPromptClient> prompt);
41 41
42 void SetClientForTest(std::unique_ptr<PDFWebContentsHelperClient> client);
43
42 private: 44 private:
43 PDFWebContentsHelper(content::WebContents* web_contents, 45 PDFWebContentsHelper(content::WebContents* web_contents,
44 std::unique_ptr<PDFWebContentsHelperClient> client); 46 std::unique_ptr<PDFWebContentsHelperClient> client);
45 ~PDFWebContentsHelper() override; 47 ~PDFWebContentsHelper() override;
46 48
47 // content::WebContentsObserver overrides: 49 // content::WebContentsObserver overrides:
48 bool OnMessageReceived(const IPC::Message& message, 50 bool OnMessageReceived(const IPC::Message& message,
49 content::RenderFrameHost* render_frame_host) override; 51 content::RenderFrameHost* render_frame_host) override;
50 void DidNavigateMainFrame( 52 void DidNavigateMainFrame(
51 const content::LoadCommittedDetails& details, 53 const content::LoadCommittedDetails& details,
(...skipping 11 matching lines...) Expand all
63 // The model for the confirmation prompt to open a PDF in Adobe Reader. 65 // The model for the confirmation prompt to open a PDF in Adobe Reader.
64 std::unique_ptr<OpenPDFInReaderPromptClient> open_in_reader_prompt_; 66 std::unique_ptr<OpenPDFInReaderPromptClient> open_in_reader_prompt_;
65 std::unique_ptr<PDFWebContentsHelperClient> client_; 67 std::unique_ptr<PDFWebContentsHelperClient> client_;
66 68
67 DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper); 69 DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper);
68 }; 70 };
69 71
70 } // namespace pdf 72 } // namespace pdf
71 73
72 #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ 74 #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/pdf/pdf_extension_test.cc ('k') | components/pdf/browser/pdf_web_contents_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698