Cleanup: Pass std::string as const reference from chromeos/
[chromium-blink-merge.git] / ui / android / view_android.cc
blob45d3d29fa122886f75828273fb80f80af48b0b52
1 // Copyright 2013 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.
5 #include "ui/android/view_android.h"
7 #include "base/android/jni_android.h"
8 #include "base/logging.h"
10 namespace ui {
12 using base::android::AttachCurrentThread;
13 using base::android::ScopedJavaLocalRef;
15 ViewAndroid::ViewAndroid(jobject view_android_delegate, WindowAndroid* window)
16 : window_android_(window) {
17 DCHECK(view_android_delegate);
18 view_android_delegate_.Reset(AttachCurrentThread(), view_android_delegate);
21 ViewAndroid::~ViewAndroid() {
24 ScopedJavaLocalRef<jobject> ViewAndroid::GetViewAndroidDelegate() {
25 return base::android::ScopedJavaLocalRef<jobject>(view_android_delegate_);
28 WindowAndroid* ViewAndroid::GetWindowAndroid() {
29 return window_android_;
32 } // namespace ui