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

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

Issue 11471040: [Android WebView] Convert context menu callback to long press (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments. Ready for review/submit. Created 8 years 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 <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 namespace content { 25 namespace content {
26 class Compositor; 26 class Compositor;
27 class WebContents; 27 class WebContents;
28 } 28 }
29 29
30 namespace android_webview { 30 namespace android_webview {
31 31
32 class AwContentsContainer; 32 class AwContentsContainer;
33 class AwRenderViewHostExt; 33 class AwRenderViewHostExt;
34 class AwWebContentsDelegate; 34 class AwWebContentsDelegate;
35 class AwWebContentsViewDelegate;
35 36
36 // Native side of java-class of same name. 37 // Native side of java-class of same name.
37 // Provides the ownership of and access to browser components required for 38 // Provides the ownership of and access to browser components required for
38 // WebView functionality; analogous to chrome's TabContents, but with a 39 // WebView functionality; analogous to chrome's TabContents, but with a
39 // level of indirection provided by the AwContentsContainer abstraction. 40 // level of indirection provided by the AwContentsContainer abstraction.
40 class AwContents : public FindHelper::Listener, 41 class AwContents : public FindHelper::Listener,
41 public content::Compositor::Client { 42 public content::Compositor::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);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int match_count, 110 int match_count,
110 bool finished) OVERRIDE; 111 bool finished) OVERRIDE;
111 112
112 // content::Compositor::Client implementation. 113 // content::Compositor::Client implementation.
113 virtual void ScheduleComposite() OVERRIDE; 114 virtual void ScheduleComposite() OVERRIDE;
114 virtual void OnSwapBuffersCompleted() OVERRIDE; 115 virtual void OnSwapBuffersCompleted() OVERRIDE;
115 116
116 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); 117 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
117 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); 118 jint ReleasePopupWebContents(JNIEnv* env, jobject obj);
118 119
120 base::android::ScopedJavaLocalRef<jobject> CreateAwWebContentsViewDelegate(
121 AwWebContentsViewDelegate* view_delegate);
122
119 private: 123 private:
120 void Invalidate(); 124 void Invalidate();
121 void SetWebContents(content::WebContents* web_contents); 125 void SetWebContents(content::WebContents* web_contents);
122 126
123 JavaObjectWeakGlobalRef java_ref_; 127 JavaObjectWeakGlobalRef java_ref_;
124 scoped_ptr<content::WebContents> web_contents_; 128 scoped_ptr<content::WebContents> web_contents_;
125 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; 129 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
126 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; 130 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
127 scoped_ptr<FindHelper> find_helper_; 131 scoped_ptr<FindHelper> find_helper_;
128 scoped_ptr<content::Compositor> compositor_; 132 scoped_ptr<content::Compositor> compositor_;
129 // State to track if the view is visible, and if the compositor knows yet. 133 // State to track if the view is visible, and if the compositor knows yet.
130 bool view_visible_; 134 bool view_visible_;
131 bool compositor_visible_; 135 bool compositor_visible_;
132 bool is_composite_pending_; 136 bool is_composite_pending_;
133 scoped_ptr<content::WebContents> pending_contents_; 137 scoped_ptr<content::WebContents> pending_contents_;
134 138
135 DISALLOW_COPY_AND_ASSIGN(AwContents); 139 DISALLOW_COPY_AND_ASSIGN(AwContents);
136 }; 140 };
137 141
138 bool RegisterAwContents(JNIEnv* env); 142 bool RegisterAwContents(JNIEnv* env);
139 143
140 } // namespace android_webview 144 } // namespace android_webview
141 145
142 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 146 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698