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

Side by Side Diff: ui/android/window_android.cc

Issue 2178973004: DialogSurfaceManager implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 3 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/android/window_android.h" 5 #include "ui/android/window_android.h"
6 6
7 #include "base/android/context_utils.h" 7 #include "base/android/context_utils.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return Java_WindowAndroid_canRequestPermission( 144 return Java_WindowAndroid_canRequestPermission(
145 env, GetJavaObject(), 145 env, GetJavaObject(),
146 base::android::ConvertUTF8ToJavaString(env, permission)); 146 base::android::ConvertUTF8ToJavaString(env, permission));
147 } 147 }
148 148
149 WindowAndroid* WindowAndroid::GetWindowAndroid() const { 149 WindowAndroid* WindowAndroid::GetWindowAndroid() const {
150 DCHECK(parent_ == nullptr); 150 DCHECK(parent_ == nullptr);
151 return const_cast<WindowAndroid*>(this); 151 return const_cast<WindowAndroid*>(this);
152 } 152 }
153 153
154 ScopedJavaLocalRef<jobject> WindowAndroid::GetWindowToken() {
155 JNIEnv* env = AttachCurrentThread();
156 return Java_WindowAndroid_getWindowToken(env, GetJavaObject());
157 }
158
154 // ---------------------------------------------------------------------------- 159 // ----------------------------------------------------------------------------
155 // Native JNI methods 160 // Native JNI methods
156 // ---------------------------------------------------------------------------- 161 // ----------------------------------------------------------------------------
157 162
158 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj, int sdk_display_id) { 163 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj, int sdk_display_id) {
159 WindowAndroid* window = new WindowAndroid(env, obj, sdk_display_id); 164 WindowAndroid* window = new WindowAndroid(env, obj, sdk_display_id);
160 return reinterpret_cast<intptr_t>(window); 165 return reinterpret_cast<intptr_t>(window);
161 } 166 }
162 167
163 } // namespace ui 168 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698