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

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: Address review comment 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 import org.chromium.content.browser.framehost.RenderFrameHostDelegate;
8 import org.chromium.content.browser.framehost.RenderFrameHostImpl;
9
10 /**
11 * Static public methods for WebContents.
12 */
13 public class WebContentsStatics {
14 /**
15 * @return The WebContens associated witht the RenderFrameHost. This can be null.
16 */
17 public static WebContents fromRenderFrameHost(RenderFrameHost rfh) {
18 RenderFrameHostDelegate delegate = ((RenderFrameHostImpl) rfh).getRender FrameHostDelegate();
19 if (delegate == null || !(delegate instanceof WebContents)) {
20 return null;
21 }
22 return (WebContents) delegate;
23 }
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698