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

Side by Side Diff: blimp/client/android/java/src/org/chromium/blimp/session/BlimpClientSession.java

Issue 1636163002: Restructure contents of blimp/client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2015 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.blimp.session;
6
7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.JNINamespace;
9
10 /**
11 * The Java representation of a native BlimpClientSession. This is primarily us ed to provide access
12 * to the native session methods and to facilitate passing a BlimpClientSession object between Java
13 * classes with native counterparts.
14 */
15 @JNINamespace("blimp::client")
16 public class BlimpClientSession {
17 private long mNativeBlimpClientSessionAndroidPtr;
18
19 public BlimpClientSession() {
20 mNativeBlimpClientSessionAndroidPtr = nativeInit();
21 }
22
23 /**
24 * Destroys the native BlimpClientSession. This class should not be used af ter this is called.
25 */
26 public void destroy() {
27 if (mNativeBlimpClientSessionAndroidPtr == 0) return;
28
29 nativeDestroy(mNativeBlimpClientSessionAndroidPtr);
30 mNativeBlimpClientSessionAndroidPtr = 0;
31 }
32
33 // Methods that are called by native via JNI.
34 @CalledByNative
35 private long getNativePtr() {
36 assert mNativeBlimpClientSessionAndroidPtr != 0;
37 return mNativeBlimpClientSessionAndroidPtr;
38 }
39
40 private native long nativeInit();
41 private native void nativeDestroy(long nativeBlimpClientSessionAndroid);
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698