Index: android_webview/native/aw_contents.h |
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h |
index 5062eb88ea5f34f303be2608d210a26ae8def30f..12ff238e9936b929ba74e450407767f6caec0f93 100644 |
--- a/android_webview/native/aw_contents.h |
+++ b/android_webview/native/aw_contents.h |
@@ -27,6 +27,7 @@ |
#include "base/android/scoped_java_ref.h" |
#include "base/callback_forward.h" |
#include "base/macros.h" |
+#include "content/public/browser/web_contents_observer.h" |
class SkBitmap; |
class TabContents; |
@@ -64,7 +65,8 @@ class AwContents : public FindHelper::Listener, |
public AwRenderViewHostExtClient, |
public BrowserViewRendererClient, |
public PermissionRequestHandlerClient, |
- public AwBrowserPermissionRequestDelegate { |
+ public AwBrowserPermissionRequestDelegate, |
+ public content::WebContentsObserver { |
public: |
// Returns the AwContents instance associated with |web_contents|, or NULL. |
static AwContents* FromWebContents(content::WebContents* web_contents); |
@@ -333,6 +335,10 @@ class AwContents : public FindHelper::Listener, |
JNIEnv* env, |
const base::android::JavaParamRef<jobject>& obj); |
+ // content::WebContentsObserver overrides |
+ void RenderViewHostChanged(content::RenderViewHost* old_host, |
+ content::RenderViewHost* new_host) override; |
+ |
private: |
void InitAutofillIfNecessary(bool enabled); |
@@ -347,9 +353,9 @@ class AwContents : public FindHelper::Listener, |
JavaObjectWeakGlobalRef java_ref_; |
AwGLFunctor* functor_; |
BrowserViewRenderer browser_view_renderer_; // Must outlive |web_contents_|. |
+ std::unique_ptr<content::WebContents> web_contents_; |
std::unique_ptr<AwWebContentsDelegate> web_contents_delegate_; |
std::unique_ptr<AwContentsClientBridge> contents_client_bridge_; |
- std::unique_ptr<content::WebContents> web_contents_; |
std::unique_ptr<AwRenderViewHostExt> render_view_host_ext_; |
std::unique_ptr<FindHelper> find_helper_; |
std::unique_ptr<IconHelper> icon_helper_; |