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 <string> | 9 #include <string> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 // WebView functionality; analogous to chrome's TabContents, but with a | 41 // WebView functionality; analogous to chrome's TabContents, but with a |
42 // level of indirection provided by the AwContentsContainer abstraction. | 42 // level of indirection provided by the AwContentsContainer abstraction. |
43 class AwContents : public FindHelper::Listener, | 43 class AwContents : public FindHelper::Listener, |
44 public IconHelper::Listener, | 44 public IconHelper::Listener, |
45 public content::Compositor::Client, | 45 public content::Compositor::Client, |
46 public AwRenderViewHostExt::Client { | 46 public AwRenderViewHostExt::Client { |
47 public: | 47 public: |
48 // Returns the AwContents instance associated with |web_contents|, or NULL. | 48 // Returns the AwContents instance associated with |web_contents|, or NULL. |
49 static AwContents* FromWebContents(content::WebContents* web_contents); | 49 static AwContents* FromWebContents(content::WebContents* web_contents); |
50 | 50 |
| 51 // Returns the AwContents instance associated with with the given |
| 52 // render_process_id and render_view_id, or NULL. |
| 53 static AwContents* FromID(int render_process_id, int render_view_id); |
| 54 |
51 AwContents(JNIEnv* env, | 55 AwContents(JNIEnv* env, |
52 jobject obj, | 56 jobject obj, |
53 jobject web_contents_delegate); | 57 jobject web_contents_delegate); |
54 virtual ~AwContents(); | 58 virtual ~AwContents(); |
55 | 59 |
56 void DrawGL(AwDrawGLInfo* draw_info); | 60 void DrawGL(AwDrawGLInfo* draw_info); |
57 bool DrawSW(JNIEnv* env, jobject obj, jobject canvas); | 61 bool DrawSW(JNIEnv* env, jobject obj, jobject canvas); |
58 | 62 |
59 void RunJavaScriptDialog( | 63 void RunJavaScriptDialog( |
60 content::JavaScriptMessageType message_type, | 64 content::JavaScriptMessageType message_type, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 EGLContext last_frame_context_; | 176 EGLContext last_frame_context_; |
173 | 177 |
174 DISALLOW_COPY_AND_ASSIGN(AwContents); | 178 DISALLOW_COPY_AND_ASSIGN(AwContents); |
175 }; | 179 }; |
176 | 180 |
177 bool RegisterAwContents(JNIEnv* env); | 181 bool RegisterAwContents(JNIEnv* env); |
178 | 182 |
179 } // namespace android_webview | 183 } // namespace android_webview |
180 | 184 |
181 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 185 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |