| OLD | NEW |
| 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 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
| 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 bool finished) OVERRIDE; | 149 bool finished) OVERRIDE; |
| 150 // IconHelper::Listener implementation. | 150 // IconHelper::Listener implementation. |
| 151 virtual void OnReceivedIcon(const SkBitmap& bitmap) OVERRIDE; | 151 virtual void OnReceivedIcon(const SkBitmap& bitmap) OVERRIDE; |
| 152 virtual void OnReceivedTouchIconUrl(const std::string& url, | 152 virtual void OnReceivedTouchIconUrl(const std::string& url, |
| 153 const bool precomposed) OVERRIDE; | 153 const bool precomposed) OVERRIDE; |
| 154 | 154 |
| 155 // BrowserViewRenderer::Client implementation. | 155 // BrowserViewRenderer::Client implementation. |
| 156 virtual void Invalidate() OVERRIDE; | 156 virtual void Invalidate() OVERRIDE; |
| 157 virtual void OnNewPicture( | 157 virtual void OnNewPicture( |
| 158 const base::android::JavaRef<jobject>& picture) OVERRIDE; | 158 const base::android::JavaRef<jobject>& picture) OVERRIDE; |
| 159 virtual bool isAttachedToViewHierarchy() OVERRIDE; |
| 160 virtual gfx::Point getLocationOnScreen() OVERRIDE; |
| 159 | 161 |
| 160 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); | 162 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); |
| 161 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); | 163 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); |
| 162 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); | 164 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); |
| 163 | 165 |
| 166 BrowserViewRenderer* browser_view_renderer() { |
| 167 return browser_view_renderer_.get(); |
| 168 } |
| 169 |
| 164 private: | 170 private: |
| 165 void SetWebContents(content::WebContents* web_contents); | 171 void SetWebContents(content::WebContents* web_contents); |
| 166 | 172 |
| 167 JavaObjectWeakGlobalRef java_ref_; | 173 JavaObjectWeakGlobalRef java_ref_; |
| 168 scoped_ptr<content::WebContents> web_contents_; | 174 scoped_ptr<content::WebContents> web_contents_; |
| 169 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 175 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
| 170 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; | 176 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; |
| 171 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 177 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
| 172 scoped_ptr<FindHelper> find_helper_; | 178 scoped_ptr<FindHelper> find_helper_; |
| 173 scoped_ptr<IconHelper> icon_helper_; | 179 scoped_ptr<IconHelper> icon_helper_; |
| 174 scoped_ptr<content::WebContents> pending_contents_; | 180 scoped_ptr<content::WebContents> pending_contents_; |
| 175 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; | 181 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; |
| 176 | 182 |
| 177 // GURL is supplied by the content layer as requesting frame. | 183 // GURL is supplied by the content layer as requesting frame. |
| 178 // Callback is supplied by the content layer, and is invoked with the result | 184 // Callback is supplied by the content layer, and is invoked with the result |
| 179 // from the permission prompt. | 185 // from the permission prompt. |
| 180 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 186 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
| 181 // The first element in the list is always the currently pending request. | 187 // The first element in the list is always the currently pending request. |
| 182 std::list<OriginCallback> pending_geolocation_prompts_; | 188 std::list<OriginCallback> pending_geolocation_prompts_; |
| 183 | 189 |
| 184 DISALLOW_COPY_AND_ASSIGN(AwContents); | 190 DISALLOW_COPY_AND_ASSIGN(AwContents); |
| 185 }; | 191 }; |
| 186 | 192 |
| 187 bool RegisterAwContents(JNIEnv* env); | 193 bool RegisterAwContents(JNIEnv* env); |
| 188 | 194 |
| 189 } // namespace android_webview | 195 } // namespace android_webview |
| 190 | 196 |
| 191 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 197 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
| OLD | NEW |