blob: 45d3d29fa122886f75828273fb80f80af48b0b52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/android/view_android.h"
#include "base/android/jni_android.h"
#include "base/logging.h"
namespace ui {
using base::android::AttachCurrentThread;
using base::android::ScopedJavaLocalRef;
ViewAndroid::ViewAndroid(jobject view_android_delegate, WindowAndroid* window)
: window_android_(window) {
DCHECK(view_android_delegate);
view_android_delegate_.Reset(AttachCurrentThread(), view_android_delegate);
}
ViewAndroid::~ViewAndroid() {
}
ScopedJavaLocalRef<jobject> ViewAndroid::GetViewAndroidDelegate() {
return base::android::ScopedJavaLocalRef<jobject>(view_android_delegate_);
}
WindowAndroid* ViewAndroid::GetWindowAndroid() {
return window_android_;
}
} // namespace ui
|