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

Side by Side Diff: chrome/browser/ui/android/javascript_app_modal_dialog_android.cc

Issue 14169011: [Android] Rename NativeWindow to WindowAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return Activity context for now Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" 5 #include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 10
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" 12 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
13 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" 13 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/common/javascript_message_type.h" 16 #include "content/public/common/javascript_message_type.h"
17 #include "jni/JavascriptAppModalDialog_jni.h" 17 #include "jni/JavascriptAppModalDialog_jni.h"
18 #include "ui/gfx/android/window_android.h" 18 #include "ui/android/window_android.h"
19 19
20 using base::android::AttachCurrentThread; 20 using base::android::AttachCurrentThread;
21 using base::android::ConvertUTF16ToJavaString; 21 using base::android::ConvertUTF16ToJavaString;
22 using base::android::ScopedJavaGlobalRef; 22 using base::android::ScopedJavaGlobalRef;
23 using base::android::ScopedJavaLocalRef; 23 using base::android::ScopedJavaLocalRef;
24 using content::BrowserThread; 24 using content::BrowserThread;
25 25
26 // static 26 // static
27 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt( 27 NativeAppModalDialog* NativeAppModalDialog::CreateNativeJavaScriptPrompt(
28 JavaScriptAppModalDialog* dialog, 28 JavaScriptAppModalDialog* dialog,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 JavascriptAppModalDialogAndroid::~JavascriptAppModalDialogAndroid() { 158 JavascriptAppModalDialogAndroid::~JavascriptAppModalDialogAndroid() {
159 JNIEnv* env = AttachCurrentThread(); 159 JNIEnv* env = AttachCurrentThread();
160 // In case the dialog is still displaying, tell it to close itself. 160 // In case the dialog is still displaying, tell it to close itself.
161 // This can happen if you trigger a dialog but close the Tab before it's 161 // This can happen if you trigger a dialog but close the Tab before it's
162 // shown, and then accept the dialog. 162 // shown, and then accept the dialog.
163 if (!dialog_jobject_.is_null()) 163 if (!dialog_jobject_.is_null())
164 Java_JavascriptAppModalDialog_dismiss(env, dialog_jobject_.obj()); 164 Java_JavascriptAppModalDialog_dismiss(env, dialog_jobject_.obj());
165 } 165 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/autofill/autofill_popup_view_android.cc ('k') | chrome/browser/ui/android/window_android_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698