Index: chromecast/shell/browser/android/cast_window_android.h |
diff --git a/chromecast/shell/browser/android/cast_window_android.h b/chromecast/shell/browser/android/cast_window_android.h |
index 512e5e8c6738cc07fbff7a69020eb6663b60b286..8115a23dfadcadcfa1f90f8280e4ad7b6dc9acf8 100644 |
--- a/chromecast/shell/browser/android/cast_window_android.h |
+++ b/chromecast/shell/browser/android/cast_window_android.h |
@@ -15,6 +15,7 @@ |
#include "base/command_line.h" |
#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "build/build_config.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/browser/web_contents_delegate.h" |
@@ -45,7 +46,10 @@ class CastWindowAndroid : public content::WebContentsDelegate, |
virtual ~CastWindowAndroid(); |
void LoadURL(const GURL& url); |
+ // Gives a time interval to deliver window.unload event before window close. |
lcwu1
2014/09/25 19:10:54
I think the comment should be something like "this
gunsch
2014/09/25 19:18:15
Done.
|
void Close(); |
+ // Destroys this window immediately. |
+ void Destroy(); |
// Registers the JNI methods for CastWindowAndroid. |
static bool RegisterJni(JNIEnv* env); |
@@ -81,6 +85,8 @@ class CastWindowAndroid : public content::WebContentsDelegate, |
base::android::ScopedJavaGlobalRef<jobject> java_object_; |
scoped_ptr<content::WebContents> web_contents_; |
+ base::WeakPtrFactory<CastWindowAndroid> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CastWindowAndroid); |
}; |