| Index: chrome/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
| diff --git a/chrome/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/chrome/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d6d08a5a8860fccb86e244a8d35584c737d46033
|
| --- /dev/null
|
| +++ b/chrome/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
| @@ -0,0 +1,58 @@
|
| +// 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 CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_H_
|
| +#define CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_H_
|
| +
|
| +#include "chrome/browser/guest_view/guest_view.h"
|
| +
|
| +#include "extensions/browser/extension_function_dispatcher.h"
|
| +
|
| +class MimeHandlerViewGuest : public GuestView<MimeHandlerViewGuest>,
|
| + public extensions::ExtensionFunctionDispatcher::Delegate {
|
| + public:
|
| + static const char Type[];
|
| +
|
| + MimeHandlerViewGuest(content::BrowserContext* browser_context,
|
| + int guest_instance_id);
|
| +
|
| + // GuestViewBase implementation.
|
| + virtual void CreateWebContents(
|
| + const std::string& embedder_extension_id,
|
| + int embedder_render_process_id,
|
| + const base::DictionaryValue& create_params,
|
| + const WebContentsCreatedCallback& callback) OVERRIDE;
|
| + virtual void DidAttachToEmbedder() OVERRIDE;
|
| + virtual void WillAttachToEmbedder() OVERRIDE;
|
| + virtual void DidInitialize() OVERRIDE;
|
| +
|
| + // content::WebContentsObserver implementation.
|
| + virtual bool OnMessageReceived(
|
| + const IPC::Message& message) OVERRIDE;
|
| +
|
| + // ExtensionFunctionDispatcher::Delegate implementation.
|
| + virtual extensions::WindowController* GetExtensionWindowController() const OVERRIDE;
|
| + virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
|
| +
|
| + private:
|
| + virtual ~MimeHandlerViewGuest();
|
| +
|
| + void AttachWebContentsHelpers(content::WebContents* contents);
|
| + void NavigateGuest(const std::string& src);
|
| + GURL ResolveURL(const std::string& url);
|
| + void LoadURLWithParams(const GURL& url,
|
| + const content::Referrer& referrer,
|
| + content::PageTransition transition_type,
|
| + content::WebContents* web_contents);
|
| +
|
| + void PushMimeHandlerViewStateToIOThread();
|
| + void OnRequest(const ExtensionHostMsg_Request_Params& params);
|
| +
|
| + scoped_ptr<extensions::ExtensionFunctionDispatcher>
|
| + extension_function_dispatcher_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MimeHandlerViewGuest);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_H_
|
|
|