OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 EXTENSIONS_BROWSER_MOJO_MIME_HANDLER_VIEW_SERVICE_H_ |
| 6 #define EXTENSIONS_BROWSER_MOJO_MIME_HANDLER_VIEW_SERVICE_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 #include "content/public/browser/render_frame_host.h" |
| 10 #include "content/public/browser/web_contents.h" |
| 11 #include "content/public/browser/web_contents_observer.h" |
| 12 #include "mojo/public/cpp/bindings/binding.h" |
| 13 #include "third_party/WebKit/public/platform/modules/mime_handler_view/mime_hand
ler_view.mojom.h" |
| 14 |
| 15 namespace extensions { |
| 16 |
| 17 class MimeHandlerViewService : public blink::mojom::MimeHandlerViewService { |
| 18 public: |
| 19 static void Create(int32_t frame_process_id, |
| 20 int32_t frame_routing_id, |
| 21 blink::mojom::MimeHandlerViewServiceRequest request); |
| 22 ~MimeHandlerViewService() override; |
| 23 |
| 24 void CreateMimeHandlerViewGuest(int32_t element_instance_id, |
| 25 const std::string& mime_type, |
| 26 const std::string& view_id, |
| 27 const GURL& resource_url) override; |
| 28 |
| 29 private: |
| 30 MimeHandlerViewService(int32_t render_frame_process_id, |
| 31 int32_t render_frame_routing_id, |
| 32 blink::mojom::MimeHandlerViewServiceRequest request); |
| 33 |
| 34 void OnGuestWebContentsCreated(int32_t element_instance_id, |
| 35 const GURL& resource_url, |
| 36 content::WebContents* guest_web_contents); |
| 37 |
| 38 const int32_t render_frame_process_id_; |
| 39 const int32_t render_frame_routing_id_; |
| 40 mojo::Binding<blink::mojom::MimeHandlerViewService> binding_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewService); |
| 43 }; |
| 44 } // namespace extensions |
| 45 |
| 46 #endif // EXTENSIONS_BROWSER_MOJO_MIME_HANDLER_VIEW_SERVICE_H_ |
OLD | NEW |