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

Side by Side Diff: chrome/renderer/plugins/pdf_plugin_placeholder.h

Issue 2961383002: Show a new placeholder for PDF's when plugins are disabled. (Closed)
Patch Set: comment Created 3 years, 5 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_
6 #define CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_
7
8 #include "components/plugins/renderer/plugin_placeholder.h"
9
10 // Creates a placeholder that allows users to click to download a PDF for when
Lei Zhang 2017/06/30 19:35:21 nit: The class dosen't create a placeholder. It is
amberwon 2017/06/30 21:59:22 Done.
11 // plugins are disabled and the PDF fails to load.
12 // TODO(amberwon): Flesh out the class more to download an embedded PDF when the
13 // PDF plugin is disabled or unavailable.
14 class PDFPluginPlaceholder final : public plugins::PluginPlaceholderBase,
15 public gin::Wrappable<PDFPluginPlaceholder> {
16 public:
17 static gin::WrapperInfo kWrapperInfo;
Lei Zhang 2017/06/30 19:35:21 Does this need the const keyword?
amberwon 2017/06/30 21:59:22 No, in the Wrappable class, kWrapperInfo is passed
Lei Zhang 2017/06/30 22:45:11 Ok, I guess this is a weird Gin thing. Let's leave
amberwon 2017/06/30 23:11:12 Acknowledged.
18
19 static PDFPluginPlaceholder* CreatePDFPlaceholder(
Lei Zhang 2017/06/30 19:35:21 Can you add a comment to explain the ownership of
amberwon 2017/06/30 21:59:22 Done.
20 content::RenderFrame* render_frame,
21 const blink::WebPluginParams& params);
22
23 private:
24 PDFPluginPlaceholder(content::RenderFrame* render_frame,
25 const blink::WebPluginParams& params,
26 const std::string& html_data);
27 ~PDFPluginPlaceholder() override;
Lei Zhang 2017/06/30 19:35:21 We usually don't bother marking classes / methods
amberwon 2017/06/30 21:59:22 Done.
Lei Zhang 2017/06/30 22:45:11 So they are now consistent, but how about we make
amberwon 2017/06/30 23:11:12 Done.
28
29 // WebViewPlugin::Delegate methods:
30 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) final;
31 };
32
33 #endif // CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698