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

Unified Diff: components/pdf/browser/pdf_web_contents_helper.h

Issue 2455543002: Convert PDF component IPC to mojo. (Closed)
Patch Set: Feedback Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/pdf/browser/BUILD.gn ('k') | components/pdf/browser/pdf_web_contents_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pdf/browser/pdf_web_contents_helper.h
diff --git a/components/pdf/browser/pdf_web_contents_helper.h b/components/pdf/browser/pdf_web_contents_helper.h
index c9a2e5897d08e94dc2aef43b6e6e9de331811404..080dca40599dd9e75f31b3a35d83f4e32fedef24 100644
--- a/components/pdf/browser/pdf_web_contents_helper.h
+++ b/components/pdf/browser/pdf_web_contents_helper.h
@@ -10,9 +10,10 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "components/pdf/common/pdf.mojom.h"
+#include "content/public/browser/web_contents_binding_set.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
-#include "ipc/ipc_message.h"
namespace content {
class WebContents;
@@ -25,7 +26,8 @@ class PDFWebContentsHelperClient;
// Per-WebContents class to handle PDF messages.
class PDFWebContentsHelper
: public content::WebContentsObserver,
- public content::WebContentsUserData<PDFWebContentsHelper> {
+ public content::WebContentsUserData<PDFWebContentsHelper>,
+ public mojom::PdfService {
public:
static void CreateForWebContentsWithClient(
content::WebContents* contents,
@@ -36,15 +38,12 @@ class PDFWebContentsHelper
std::unique_ptr<PDFWebContentsHelperClient> client);
~PDFWebContentsHelper() override;
- // content::WebContentsObserver overrides:
- bool OnMessageReceived(const IPC::Message& message,
- content::RenderFrameHost* render_frame_host) override;
-
- // Message handlers.
- void OnHasUnsupportedFeature();
- void OnSaveURLAs(const GURL& url, const content::Referrer& referrer);
- void OnUpdateContentRestrictions(int content_restrictions);
+ // mojom::PdfService:
+ void HasUnsupportedFeature() override;
+ void SaveUrlAs(const GURL& url, const content::Referrer& referrer) override;
+ void UpdateContentRestrictions(int32_t content_restrictions) override;
+ content::WebContentsFrameBindingSet<mojom::PdfService> pdf_service_bindings_;
std::unique_ptr<PDFWebContentsHelperClient> client_;
DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper);
« no previous file with comments | « components/pdf/browser/BUILD.gn ('k') | components/pdf/browser/pdf_web_contents_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698