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

Side by Side Diff: android_webview/native/aw_contents.h

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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 #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 20 matching lines...) Expand all
31 class AwContentsContainer; 31 class AwContentsContainer;
32 class AwContentsClientBridge; 32 class AwContentsClientBridge;
33 class AwWebContentsDelegate; 33 class AwWebContentsDelegate;
34 34
35 // Native side of java-class of same name. 35 // Native side of java-class of same name.
36 // Provides the ownership of and access to browser components required for 36 // Provides the ownership of and access to browser components required for
37 // WebView functionality; analogous to chrome's TabContents, but with a 37 // WebView functionality; analogous to chrome's TabContents, but with a
38 // level of indirection provided by the AwContentsContainer abstraction. 38 // level of indirection provided by the AwContentsContainer abstraction.
39 class AwContents : public FindHelper::Listener, 39 class AwContents : public FindHelper::Listener,
40 public IconHelper::Listener, 40 public IconHelper::Listener,
41 public AwRenderViewHostExtClient,
41 public BrowserViewRenderer::Client { 42 public BrowserViewRenderer::Client {
42 public: 43 public:
43 // Returns the AwContents instance associated with |web_contents|, or NULL. 44 // Returns the AwContents instance associated with |web_contents|, or NULL.
44 static AwContents* FromWebContents(content::WebContents* web_contents); 45 static AwContents* FromWebContents(content::WebContents* web_contents);
45 46
46 // Returns the AwContents instance associated with with the given 47 // Returns the AwContents instance associated with with the given
47 // render_process_id and render_view_id, or NULL. 48 // render_process_id and render_view_id, or NULL.
48 static AwContents* FromID(int render_process_id, int render_view_id); 49 static AwContents* FromID(int render_process_id, int render_view_id);
49 50
50 AwContents(JNIEnv* env, 51 AwContents(JNIEnv* env,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 // FindHelper::Listener implementation. 127 // FindHelper::Listener implementation.
127 virtual void OnFindResultReceived(int active_ordinal, 128 virtual void OnFindResultReceived(int active_ordinal,
128 int match_count, 129 int match_count,
129 bool finished) OVERRIDE; 130 bool finished) OVERRIDE;
130 // IconHelper::Listener implementation. 131 // IconHelper::Listener implementation.
131 virtual void OnReceivedIcon(const SkBitmap& bitmap) OVERRIDE; 132 virtual void OnReceivedIcon(const SkBitmap& bitmap) OVERRIDE;
132 virtual void OnReceivedTouchIconUrl(const std::string& url, 133 virtual void OnReceivedTouchIconUrl(const std::string& url,
133 const bool precomposed) OVERRIDE; 134 const bool precomposed) OVERRIDE;
134 135
136 // AwRenderViewHostExtClient implementation.
137 virtual void OnPageScaleFactorChanged(float page_scale_factor) OVERRIDE;
138
135 // BrowserViewRenderer::Client implementation. 139 // BrowserViewRenderer::Client implementation.
136 virtual void Invalidate() OVERRIDE; 140 virtual void Invalidate() OVERRIDE;
137 virtual void OnNewPicture() OVERRIDE; 141 virtual void OnNewPicture() OVERRIDE;
138 virtual gfx::Point GetLocationOnScreen() OVERRIDE; 142 virtual gfx::Point GetLocationOnScreen() OVERRIDE;
139 virtual void OnPageScaleFactorChanged(float page_scale_factor) OVERRIDE;
140 143
141 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); 144 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
142 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); 145 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
143 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); 146 jint ReleasePopupWebContents(JNIEnv* env, jobject obj);
144 147
145 private: 148 private:
146 void SetWebContents(content::WebContents* web_contents); 149 void SetWebContents(content::WebContents* web_contents);
147 150
148 JavaObjectWeakGlobalRef java_ref_; 151 JavaObjectWeakGlobalRef java_ref_;
149 scoped_ptr<content::WebContents> web_contents_; 152 scoped_ptr<content::WebContents> web_contents_;
(...skipping 13 matching lines...) Expand all
163 std::list<OriginCallback> pending_geolocation_prompts_; 166 std::list<OriginCallback> pending_geolocation_prompts_;
164 167
165 DISALLOW_COPY_AND_ASSIGN(AwContents); 168 DISALLOW_COPY_AND_ASSIGN(AwContents);
166 }; 169 };
167 170
168 bool RegisterAwContents(JNIEnv* env); 171 bool RegisterAwContents(JNIEnv* env);
169 172
170 } // namespace android_webview 173 } // namespace android_webview
171 174
172 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 175 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698