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

Unified Diff: chromecast/shell/browser/android/cast_window_manager.cc

Issue 601293002: Chromecast: call ClosePage(), wait 50ms before deleting WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment nit, rebase Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/shell/browser/android/cast_window_manager.cc
diff --git a/chromecast/shell/browser/android/cast_window_manager.cc b/chromecast/shell/browser/android/cast_window_manager.cc
index 8f485d54690f8d588e1b4029d754086bec0889e9..481eb4bbffef5052adfcbea01cce9906dfbc61cf 100644
--- a/chromecast/shell/browser/android/cast_window_manager.cc
+++ b/chromecast/shell/browser/android/cast_window_manager.cc
@@ -65,11 +65,15 @@ jlong LaunchCastWindow(JNIEnv* env, jclass clazz, jstring jurl) {
url));
}
-void StopCastWindow(JNIEnv* env, jclass clazz, jlong nativeCastWindow) {
+void StopCastWindow(JNIEnv* env, jclass clazz,
+ jlong nativeCastWindow, jboolean gracefully) {
CastWindowAndroid* window =
reinterpret_cast<CastWindowAndroid*>(nativeCastWindow);
DCHECK(window);
- window->Close();
+ if (gracefully)
+ window->Close();
+ else
+ window->Destroy();
}
void EnableDevTools(JNIEnv* env, jclass clazz, jboolean enable) {
« no previous file with comments | « chromecast/shell/browser/android/cast_window_android.cc ('k') | chromecast/shell/browser/cast_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698