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.
5 #ifndef CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_
6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_
8 #include "chrome/browser/guest_view/guest_view_base.h"
11 class GuestView
: public GuestViewBase
{
13 static T
* From(int embedder_process_id
, int guest_instance_id
) {
14 GuestViewBase
* guest
=
15 GuestViewBase::From(embedder_process_id
, guest_instance_id
);
18 return guest
->As
<T
>();
21 static T
* FromWebContents(content::WebContents
* contents
) {
22 GuestViewBase
* guest
= GuestViewBase::FromWebContents(contents
);
23 return guest
? guest
->As
<T
>() : NULL
;
26 // GuestViewBase implementation.
27 virtual const char* GetViewType() const OVERRIDE
{
32 GuestView(content::WebContents
* guest_web_contents
,
33 const std::string
& embedder_extension_id
,
34 const base::WeakPtr
<GuestViewBase
>& opener
)
35 : GuestViewBase(guest_web_contents
, embedder_extension_id
, opener
) {}
38 DISALLOW_COPY_AND_ASSIGN(GuestView
);
41 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_H_