Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Side by Side Diff: content/public/android/java/src/org/chromium/content_public/browser/WebContentsStatics.java

Issue 2692023002: Make PaymentRequestImpl work with RenderFrameHost (Closed)
Patch Set: Remove public from WebContentsImpl Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 * Static public methods for WebContents.
9 */
10 public class WebContentsStatics {
11 /**
12 * @return The WebContens associated witht the RenderFrameHost. This can be null.
13 */
14 public static WebContents fromRenderFrameHost(RenderFrameHost rfh) {
boliu 2017/03/10 19:02:10 this class is free to import non-public content cl
rwlbuis 2017/03/10 21:40:42 Ah, I did not realize that was okay :) Fixed.
15 RenderFrameHostDelegate delegate = rfh.getRenderFrameHostDelegate();
16 if (delegate == null || !(delegate instanceof WebContents)) {
17 return null;
18 }
19 return (WebContents) delegate;
20 }
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698