| Index: extensions/browser/mojo/mime_handler_view_service.h
|
| diff --git a/extensions/browser/mojo/mime_handler_view_service.h b/extensions/browser/mojo/mime_handler_view_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2c18540e2606658c13485ed90444e4bb3e88da73
|
| --- /dev/null
|
| +++ b/extensions/browser/mojo/mime_handler_view_service.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2014 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 EXTENSIONS_BROWSER_MOJO_MIME_HANDLER_VIEW_SERVICE_H_
|
| +#define EXTENSIONS_BROWSER_MOJO_MIME_HANDLER_VIEW_SERVICE_H_
|
| +
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "content/public/browser/render_frame_host.h"
|
| +#include "content/public/browser/web_contents.h"
|
| +#include "content/public/browser/web_contents_observer.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| +#include "third_party/WebKit/public/platform/modules/mime_handler_view/mime_handler_view.mojom.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +class MimeHandlerViewService : public blink::mojom::MimeHandlerViewService {
|
| + public:
|
| + static void Create(int32_t frame_process_id,
|
| + int32_t frame_routing_id,
|
| + blink::mojom::MimeHandlerViewServiceRequest request);
|
| + ~MimeHandlerViewService() override;
|
| +
|
| + void CreateMimeHandlerViewGuest(int32_t element_instance_id,
|
| + const std::string& mime_type,
|
| + const std::string& view_id,
|
| + const GURL& resource_url) override;
|
| +
|
| + private:
|
| + MimeHandlerViewService(int32_t render_frame_process_id,
|
| + int32_t render_frame_routing_id,
|
| + blink::mojom::MimeHandlerViewServiceRequest request);
|
| +
|
| + void OnGuestWebContentsCreated(int32_t element_instance_id,
|
| + const GURL& resource_url,
|
| + content::WebContents* guest_web_contents);
|
| +
|
| + const int32_t render_frame_process_id_;
|
| + const int32_t render_frame_routing_id_;
|
| + mojo::Binding<blink::mojom::MimeHandlerViewService> binding_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewService);
|
| +};
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_BROWSER_MOJO_MIME_HANDLER_VIEW_SERVICE_H_
|
|
|