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

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

Issue 2765443004: AndroidOverlay implementation using Dialog. (Closed)
Patch Set: fixed test Created 3 years, 7 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
« no previous file with comments | « ui/android/window_android.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 return Java_WindowAndroid_canRequestPermission( 271 return Java_WindowAndroid_canRequestPermission(
272 env, GetJavaObject(), 272 env, GetJavaObject(),
273 base::android::ConvertUTF8ToJavaString(env, permission)); 273 base::android::ConvertUTF8ToJavaString(env, permission));
274 } 274 }
275 275
276 WindowAndroid* WindowAndroid::GetWindowAndroid() const { 276 WindowAndroid* WindowAndroid::GetWindowAndroid() const {
277 DCHECK(parent_ == nullptr); 277 DCHECK(parent_ == nullptr);
278 return const_cast<WindowAndroid*>(this); 278 return const_cast<WindowAndroid*>(this);
279 } 279 }
280 280
281 ScopedJavaLocalRef<jobject> WindowAndroid::GetWindowToken() {
282 JNIEnv* env = AttachCurrentThread();
283 return Java_WindowAndroid_getWindowToken(env, GetJavaObject());
284 }
285
281 // ---------------------------------------------------------------------------- 286 // ----------------------------------------------------------------------------
282 // Native JNI methods 287 // Native JNI methods
283 // ---------------------------------------------------------------------------- 288 // ----------------------------------------------------------------------------
284 289
285 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj, int sdk_display_id) { 290 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj, int sdk_display_id) {
286 WindowAndroid* window = new WindowAndroid(env, obj, sdk_display_id); 291 WindowAndroid* window = new WindowAndroid(env, obj, sdk_display_id);
287 return reinterpret_cast<intptr_t>(window); 292 return reinterpret_cast<intptr_t>(window);
288 } 293 }
289 294
290 } // namespace ui 295 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/window_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698