Index: chrome/browser/guest_view/guest_view.h |
diff --git a/chrome/browser/guest_view/guest_view.h b/chrome/browser/guest_view/guest_view.h |
index 3633b0358ecc8328d55ba9ace73d9429c18a570f..8afabce72e5802f8c398776eefe92eba4ad05795 100644 |
--- a/chrome/browser/guest_view/guest_view.h |
+++ b/chrome/browser/guest_view/guest_view.h |
@@ -23,16 +23,29 @@ class GuestView : public GuestViewBase { |
return guest ? guest->As<T>() : NULL; |
} |
+ T* GetOpener() const { |
+ GuestViewBase* guest = GuestViewBase::GetOpener(); |
+ if (!guest) |
+ return NULL; |
+ return guest->As<T>(); |
+ } |
+ |
+ void SetOpener(T* opener) { |
+ GuestViewBase::SetOpener(opener); |
+ } |
+ |
// GuestViewBase implementation. |
virtual const char* GetViewType() const OVERRIDE { |
return T::Type; |
} |
protected: |
- GuestView(content::WebContents* guest_web_contents, |
- const std::string& embedder_extension_id, |
- const base::WeakPtr<GuestViewBase>& opener) |
- : GuestViewBase(guest_web_contents, embedder_extension_id, opener) {} |
+ GuestView(int guest_instance_id, |
+ content::WebContents* guest_web_contents, |
+ const std::string& embedder_extension_id) |
+ : GuestViewBase(guest_instance_id, |
+ guest_web_contents, |
+ embedder_extension_id) {} |
private: |
DISALLOW_COPY_AND_ASSIGN(GuestView); |