1 // Copyright 2017 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.
4
5 package org.chromium.content_public.browser;
6
7 /**
8 * The RenderFrameHost Java wrapper to allow communicating with the native Rende
rFrameHost object.
9 *
10 */
11 public interface RenderFrameHostDelegate {
12 /**
13 * @return The WebContents associated with this iframe.
14 */
15 WebContents getAsWebContents();
boliu
2017/03/03 23:55:30
mentioning WebContents here is still a layering vi
mentioning WebContents here is still a layering violation. WebContentsImpl
should know enough to know when it's safe to cast this back down to
WebContentsImpl. this interface literally has no methods right now.
Also this should not be part of content_public. you can add
WebContents.fromRenderFrameHost instead if needed
rwlbuis
2017/03/06 20:58:58
I wanted to mirror the C++ structure here, but ind
On 2017/03/03 23:55:30, boliu wrote:
> mentioning WebContents here is still a layering violation. WebContentsImpl
> should know enough to know when it's safe to cast this back down to
> WebContentsImpl. this interface literally has no methods right now.
I wanted to mirror the C++ structure here, but indeed I did that incorrectly.
> Also this should not be part of content_public. you can add
> WebContents.fromRenderFrameHost instead if needed
I moved RenderFrameHostDelegate out of content_public and introduced
WebContentsImpl.fromRenderFrameHost. Since fromRenderFrameHost needs to
be static IMO it does not fit well in WebContents.
boliu
2017/03/06 23:12:38
That's fine for this CL. But if you ever need it t
On 2017/03/06 20:58:58, rwlbuis wrote:
> On 2017/03/03 23:55:30, boliu wrote:
> > mentioning WebContents here is still a layering violation. WebContentsImpl
> > should know enough to know when it's safe to cast this back down to
> > WebContentsImpl. this interface literally has no methods right now.
>
> I wanted to mirror the C++ structure here, but indeed I did that incorrectly.
>
> > Also this should not be part of content_public. you can add
> > WebContents.fromRenderFrameHost instead if needed
>
> I moved RenderFrameHostDelegate out of content_public and introduced
> WebContentsImpl.fromRenderFrameHost. Since fromRenderFrameHost needs to
> be static IMO it does not fit well in WebContents.
That's fine for this CL. But if you ever need it to be public, should add a
WebContentsStatics class in content_public and add the static methods belonging
to WebContents there.
Issue 2681933002: Add Java wrapper for RenderFrameHost
(Closed)
Created 3 years, 10 months ago by rwlbuis
Modified 3 years, 9 months ago
Reviewers: please use gerrit instead, dcheng, Ted C, boliu, jam
Base URL:
Comments: 76