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

Side by Side 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, 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 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 MimeHanderView_h
6 #define MimeHanderView_h
7
8 #include "core/plugins/PluginClient.h"
9 #include "modules/ModulesExport.h"
10 #include "platform/heap/GarbageCollected.h"
11 #include "platform/heap/Persistent.h"
12 #include "public/platform/WebString.h"
13 #include "public/platform/WebURL.h"
14 #include "public/platform/modules/mime_handler_view/mime_handler_view.mojom-blin k.h"
15 #include "public/web/WebAssociatedURLLoader.h"
16
17 namespace blink {
18 class HTMLPlugInElement;
19 class LocalFrame;
20 class WebString;
21
22 class MODULES_EXPORT MimeHandlerView final : public PluginClient {
23 public:
24 static MimeHandlerView* create(HTMLPlugInElement*,
25 const WebURL&,
26 const WebString&,
27 int32_t);
28 ~MimeHandlerView();
29
30 // Verifies that the MimeHandlerViewService exists and can handle the mime
31 // type.
32 bool initialize();
33 void close();
34
35 // PluginClient override.
36 v8::Local<v8::Object> scriptableObject(v8::Isolate*) override;
37
38 private:
39 explicit MimeHandlerView(HTMLPlugInElement*, const WebURL&, const WebString&, int32_t);
40
41 LocalFrame* embedderFrame();
42 void createWebUrlRequestForResource();
43 mojom::blink::MimeHandlerViewServicePtr mimeHandlerViewService();
44 void createMimeHandlerView(const WebString&);
45
46 WebString m_mimeType;
47 WebURL m_resourceUrl;
48 int32_t m_elementInstanceId;
49 std::unique_ptr<blink::WebAssociatedURLLoader> m_loader;
50 };
51 }
52
53 #endif // MimeHanderView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698