OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // Relay the access from Java layer to GetScaledContentBitmap through JNI. | 126 // Relay the access from Java layer to GetScaledContentBitmap through JNI. |
127 void GetContentBitmap(JNIEnv* env, | 127 void GetContentBitmap(JNIEnv* env, |
128 const base::android::JavaParamRef<jobject>& obj, | 128 const base::android::JavaParamRef<jobject>& obj, |
129 const base::android::JavaParamRef<jobject>& jcallback, | 129 const base::android::JavaParamRef<jobject>& jcallback, |
130 const base::android::JavaParamRef<jobject>& color_type, | 130 const base::android::JavaParamRef<jobject>& color_type, |
131 jfloat scale, | 131 jfloat scale, |
132 jfloat x, | 132 jfloat x, |
133 jfloat y, | 133 jfloat y, |
134 jfloat width, | 134 jfloat width, |
135 jfloat height); | 135 jfloat height); |
| 136 |
| 137 void OnContextMenuClosed(JNIEnv* env, jobject obj); |
| 138 |
136 void set_synchronous_compositor_client(SynchronousCompositorClient* client) { | 139 void set_synchronous_compositor_client(SynchronousCompositorClient* client) { |
137 synchronous_compositor_client_ = client; | 140 synchronous_compositor_client_ = client; |
138 } | 141 } |
139 SynchronousCompositorClient* synchronous_compositor_client() const { | 142 SynchronousCompositorClient* synchronous_compositor_client() const { |
140 return synchronous_compositor_client_; | 143 return synchronous_compositor_client_; |
141 } | 144 } |
142 | 145 |
143 private: | 146 private: |
144 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); | 147 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); |
145 | 148 |
146 void OnFinishGetContentBitmap( | 149 void OnFinishGetContentBitmap( |
147 base::android::ScopedJavaGlobalRef<jobject>* obj, | 150 base::android::ScopedJavaGlobalRef<jobject>* obj, |
148 base::android::ScopedJavaGlobalRef<jobject>* callback, | 151 base::android::ScopedJavaGlobalRef<jobject>* callback, |
149 const SkBitmap& bitmap, | 152 const SkBitmap& bitmap, |
150 ReadbackResponse response); | 153 ReadbackResponse response); |
151 | 154 |
152 WebContents* web_contents_; | 155 WebContents* web_contents_; |
153 NavigationControllerAndroid navigation_controller_; | 156 NavigationControllerAndroid navigation_controller_; |
154 base::android::ScopedJavaGlobalRef<jobject> obj_; | 157 base::android::ScopedJavaGlobalRef<jobject> obj_; |
155 SynchronousCompositorClient* synchronous_compositor_client_; | 158 SynchronousCompositorClient* synchronous_compositor_client_; |
156 | 159 |
157 base::WeakPtrFactory<WebContentsAndroid> weak_factory_; | 160 base::WeakPtrFactory<WebContentsAndroid> weak_factory_; |
158 | 161 |
159 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid); | 162 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid); |
160 }; | 163 }; |
161 | 164 |
162 } // namespace content | 165 } // namespace content |
163 | 166 |
164 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ | 167 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ |
OLD | NEW |