| Index: content/public/browser/guest_host.h
|
| diff --git a/content/public/browser/guest_host.h b/content/public/browser/guest_host.h
|
| index a1b429f535b9251e5121b254053eab2d2580f96c..c8fa0e1ed52edf32a057b55a416c086048bd0875 100644
|
| --- a/content/public/browser/guest_host.h
|
| +++ b/content/public/browser/guest_host.h
|
| @@ -5,9 +5,24 @@
|
| #ifndef CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
|
| #define CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
|
|
|
| +#include "third_party/WebKit/public/platform/WebFocusType.h"
|
| #include "ui/gfx/geometry/size.h"
|
|
|
| +namespace blink {
|
| +class WebInputEvent;
|
| +}
|
| +
|
| namespace content {
|
| +class WebContents;
|
| +
|
| +struct GuestAttachParams {
|
| + bool focused;
|
| + bool visible;
|
| + gfx::Rect view_rect;
|
| + bool is_full_page;
|
| +
|
| + GuestAttachParams() : focused(false), visible(false), is_full_page(false) {}
|
| +};
|
|
|
| // A GuestHost is the content API for a guest WebContents.
|
| // Guests are top-level frames that can be embedded within other pages.
|
| @@ -20,6 +35,11 @@ namespace content {
|
| // its API can only be accessed by a BrowserPluginGuestDelegate.
|
| class GuestHost {
|
| public:
|
| + // Called when a GuestView has attached to an embedder.
|
| + virtual void Attach(int element_instance_id,
|
| + WebContents* embedder_web_contents,
|
| + const GuestAttachParams& params) = 0;
|
| +
|
| // Loads a URL using the specified |load_params| and returns a routing ID for
|
| // a proxy for the guest.
|
| virtual int LoadURLWithParams(
|
| @@ -28,9 +48,19 @@ class GuestHost {
|
| // Called when the GuestHost's size changes due to auto resize.
|
| virtual void GuestResizeDueToAutoResize(const gfx::Size& new_size) = 0;
|
|
|
| + // updates the visibility of the guest container. Note that the guest is
|
| + // visible if both the guest's container and the guest's embedder are visible.
|
| + virtual void SetContainerVisible(bool visible) = 0;
|
| +
|
| + // Updates the focus state of the guest.
|
| + virtual void SetFocus(bool focused, blink::WebFocusType focus_type) = 0;
|
| +
|
| // Sets the size of the guest WebContents.
|
| virtual void SizeContents(const gfx::Size& new_size) = 0;
|
|
|
| + // Forwards input events to the guest.
|
| + virtual void ForwardInputEvent(const blink::WebInputEvent* event) = 0;
|
| +
|
| // Called when the GuestHost is about to be destroyed.
|
| virtual void WillDestroy() = 0;
|
| };
|
|
|