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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java

Issue 2132163002: Add BlimpClientContext and factory with real and dummy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-blimp-client-core-public-to-blimp-client
Patch Set: Added delegate-support to BlimpClientContext Created 4 years, 5 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 2016 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.chrome.browser.blimp;
6
7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.JNINamespace;
9 import org.chromium.chrome.browser.profiles.Profile;
10
11 /**
12 * The ChromeBlimpClientContextDelegate for //chrome which provides the necessar y functionality
13 * required to run Blimp. This is the Java counterparty to the C++
14 * ChromeBlimpClientContextDelegateAndroid.
15 */
16 @JNINamespace("chrome")
17 public class ChromeBlimpClientContextDelegate {
18 public static ChromeBlimpClientContextDelegate createAndSetDelegateForContex t(Profile profile) {
David Trainor- moved to gerrit 2016/07/14 19:07:13 Javadoc? Explain a bit taht only one of these can
nyquist 2016/07/14 22:56:50 Yeah, that'd be cool, but the constructor of the C
19 return new ChromeBlimpClientContextDelegate(profile);
20 }
21
22 /**
23 * The pointer to the ChromeBlimpClientContextDelegateAndroid JNI bridge.
24 */
25 private long mNativeChromeBlimpClientContextDelegateAndroid;
26
27 private ChromeBlimpClientContextDelegate(Profile profile) {
28 mNativeChromeBlimpClientContextDelegateAndroid = nativeInit(profile);
29 }
30
31 @CalledByNative
32 private void clearNativePtr() {
33 mNativeChromeBlimpClientContextDelegateAndroid = 0;
34 }
35
36 public void destroy() {
37 assert mNativeChromeBlimpClientContextDelegateAndroid != 0;
38 nativeDestroy(mNativeChromeBlimpClientContextDelegateAndroid);
39 }
40
41 private native long nativeInit(Profile profile);
42 private native void nativeDestroy(long nativeChromeBlimpClientContextDelegat eAndroid);
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698