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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 11428091: Migrate the Android compositor to cc::Layer classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index e6d2d8e49390afd54154bf033bcc9fe0ab0a57b9..05c82d53be2a4fa22378c55fab8c001006b0aaf0 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -11,6 +11,7 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
+#include "cc/layer.h"
#include "content/browser/android/interstitial_page_delegate_android.h"
#include "content/browser/android/load_url_params.h"
#include "content/browser/android/touch_point.h"
@@ -60,7 +61,6 @@ using base::android::ScopedJavaLocalRef;
using WebKit::WebGestureEvent;
using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory;
-using WebKit::WebLayer;
// Describes the type and enabled state of a select popup item.
// Keep in sync with the value defined in SelectPopupDialog.java
@@ -147,7 +147,7 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj,
ui::WindowAndroid* window_android)
: java_ref_(env, obj),
web_contents_(static_cast<WebContentsImpl*>(web_contents)),
- root_layer_(WebLayer::create()),
+ root_layer_(cc::Layer::create()),
tab_crashed_(false),
window_android_(window_android) {
CHECK(web_contents) <<
@@ -601,11 +601,11 @@ gfx::Rect ContentViewCoreImpl::GetBounds() const {
Java_ContentViewCore_getHeight(env, j_obj.obj()));
}
-void ContentViewCoreImpl::AttachWebLayer(WebLayer* layer) {
+void ContentViewCoreImpl::AttachLayer(scoped_refptr<cc::Layer> layer) {
root_layer_->addChild(layer);
}
-void ContentViewCoreImpl::RemoveWebLayer(WebLayer* layer) {
+void ContentViewCoreImpl::RemoveLayer(scoped_refptr<cc::Layer> layer) {
layer->removeFromParent();
}
@@ -619,7 +619,7 @@ ui::WindowAndroid* ContentViewCoreImpl::GetWindowAndroid() const {
return window_android_;
}
-WebLayer* ContentViewCoreImpl::GetWebLayer() const {
+scoped_refptr<cc::Layer> ContentViewCoreImpl::GetLayer() const {
return root_layer_.get();
}
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/android/content_view_render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698