Chromium Code Reviews| 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 CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/android/jni_helper.h" | 10 #include "base/android/jni_helper.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 class RenderWidgetHostViewAndroid; | 29 class RenderWidgetHostViewAndroid; |
| 30 | 30 |
| 31 // TODO(jrg): this is a shell. Upstream the rest. | 31 // TODO(jrg): this is a shell. Upstream the rest. |
| 32 class ContentViewCoreImpl : public ContentViewCore, | 32 class ContentViewCoreImpl : public ContentViewCore, |
| 33 public NotificationObserver { | 33 public NotificationObserver { |
| 34 public: | 34 public: |
| 35 ContentViewCoreImpl(JNIEnv* env, | 35 ContentViewCoreImpl(JNIEnv* env, |
| 36 jobject obj, | 36 jobject obj, |
| 37 bool hardware_accelerated, | 37 bool hardware_accelerated, |
| 38 bool take_ownership_of_web_contents, | 38 bool take_ownership_of_web_contents, |
| 39 WebContents* web_contents); | 39 WebContents* web_contents, |
| 40 WindowAndroid* window_android); | |
| 40 | 41 |
| 41 // ContentViewCore overrides | 42 // ContentViewCore overrides |
| 42 virtual void Destroy(JNIEnv* env, jobject obj) OVERRIDE; | 43 virtual void Destroy(JNIEnv* env, jobject obj) OVERRIDE; |
| 43 | 44 |
| 44 // -------------------------------------------------------------------------- | 45 // -------------------------------------------------------------------------- |
| 45 // Methods called from Java via JNI | 46 // Methods called from Java via JNI |
| 46 // -------------------------------------------------------------------------- | 47 // -------------------------------------------------------------------------- |
| 47 | 48 |
| 48 // Notifies the ContentViewCore that items were selected in the currently | 49 // Notifies the ContentViewCore that items were selected in the currently |
| 49 // showing select popup. | 50 // showing select popup. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 | 163 |
| 163 // -------------------------------------------------------------------------- | 164 // -------------------------------------------------------------------------- |
| 164 // Methods called from native code | 165 // Methods called from native code |
| 165 // -------------------------------------------------------------------------- | 166 // -------------------------------------------------------------------------- |
| 166 | 167 |
| 167 gfx::Rect GetBounds() const; | 168 gfx::Rect GetBounds() const; |
| 168 | 169 |
| 169 WebContents* web_contents() const { return web_contents_; } | 170 WebContents* web_contents() const { return web_contents_; } |
| 170 | 171 |
| 171 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; | 172 virtual void LoadUrl(NavigationController::LoadURLParams& params) OVERRIDE; |
| 173 virtual WindowAndroid* GetWindowAndroid() OVERRIDE; | |
| 172 | 174 |
| 173 private: | 175 private: |
| 174 // NotificationObserver implementation. | 176 // NotificationObserver implementation. |
| 175 virtual void Observe(int type, | 177 virtual void Observe(int type, |
| 176 const NotificationSource& source, | 178 const NotificationSource& source, |
| 177 const NotificationDetails& details) OVERRIDE; | 179 const NotificationDetails& details) OVERRIDE; |
| 178 | 180 |
| 179 // -------------------------------------------------------------------------- | 181 // -------------------------------------------------------------------------- |
| 180 // Private methods that call to Java via JNI | 182 // Private methods that call to Java via JNI |
| 181 // -------------------------------------------------------------------------- | 183 // -------------------------------------------------------------------------- |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 208 // display in the ContentViewCore. | 210 // display in the ContentViewCore. |
| 209 WebContentsImpl* web_contents_; | 211 WebContentsImpl* web_contents_; |
| 210 bool owns_web_contents_; | 212 bool owns_web_contents_; |
| 211 | 213 |
| 212 // We only set this to be the delegate of the web_contents if we own it. | 214 // We only set this to be the delegate of the web_contents if we own it. |
| 213 scoped_ptr<ContentViewClient> content_view_client_; | 215 scoped_ptr<ContentViewClient> content_view_client_; |
| 214 | 216 |
| 215 // Whether the renderer backing this ContentViewCore has crashed. | 217 // Whether the renderer backing this ContentViewCore has crashed. |
| 216 bool tab_crashed_; | 218 bool tab_crashed_; |
| 217 | 219 |
| 220 WindowAndroid* window_android_; | |
|
Yaron
2012/09/12 19:14:45
Add comment.
aurimas (slooooooooow)
2012/09/13 15:37:15
Done.
| |
| 221 | |
| 218 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); | 222 DISALLOW_COPY_AND_ASSIGN(ContentViewCoreImpl); |
| 219 }; | 223 }; |
| 220 | 224 |
| 221 bool RegisterContentViewCore(JNIEnv* env); | 225 bool RegisterContentViewCore(JNIEnv* env); |
| 222 | 226 |
| 223 } // namespace content | 227 } // namespace content |
| 224 | 228 |
| 225 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ | 229 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIEW_CORE_IMPL_H_ |
| OLD | NEW |