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

Unified Diff: third_party/WebKit/Source/modules/mime_handler_view/MimeHandlerView.h

Issue 2719333002: second stage
Patch Set: Need to get around resource loading without web/ Created 3 years, 10 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
Index: third_party/WebKit/Source/modules/mime_handler_view/MimeHandlerView.h
diff --git a/third_party/WebKit/Source/modules/mime_handler_view/MimeHandlerView.h b/third_party/WebKit/Source/modules/mime_handler_view/MimeHandlerView.h
new file mode 100644
index 0000000000000000000000000000000000000000..06f13557ea01ebef38d15deabe629fdb3e210c97
--- /dev/null
+++ b/third_party/WebKit/Source/modules/mime_handler_view/MimeHandlerView.h
@@ -0,0 +1,53 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MimeHanderView_h
+#define MimeHanderView_h
+
+#include "core/plugins/PluginClient.h"
+#include "modules/ModulesExport.h"
+#include "platform/heap/GarbageCollected.h"
+#include "platform/heap/Persistent.h"
+#include "public/platform/WebString.h"
+#include "public/platform/WebURL.h"
+#include "public/platform/modules/mime_handler_view/mime_handler_view.mojom-blink.h"
+#include "public/web/WebAssociatedURLLoader.h"
+
+namespace blink {
+class HTMLPlugInElement;
+class LocalFrame;
+class WebString;
+
+class MODULES_EXPORT MimeHandlerView final : public PluginClient {
+ public:
+ static MimeHandlerView* create(HTMLPlugInElement*,
+ const WebURL&,
+ const WebString&,
+ int32_t);
+ ~MimeHandlerView();
+
+ // Verifies that the MimeHandlerViewService exists and can handle the mime
+ // type.
+ bool initialize();
+ void close();
+
+ // PluginClient override.
+ v8::Local<v8::Object> scriptableObject(v8::Isolate*) override;
+
+ private:
+ explicit MimeHandlerView(HTMLPlugInElement*, const WebURL&, const WebString&, int32_t);
+
+ LocalFrame* embedderFrame();
+ void createWebUrlRequestForResource();
+ mojom::blink::MimeHandlerViewServicePtr mimeHandlerViewService();
+ void createMimeHandlerView(const WebString&);
+
+ WebString m_mimeType;
+ WebURL m_resourceUrl;
+ int32_t m_elementInstanceId;
+ std::unique_ptr<blink::WebAssociatedURLLoader> m_loader;
+};
+}
+
+#endif // MimeHanderView_h

Powered by Google App Engine
This is Rietveld 408576698