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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 10693134: Revert 146000 - Split out ContentViewCore from ContentView for embedders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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/renderer_host/render_widget_host_view_android.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_view_android.cc (revision 146004)
+++ content/browser/renderer_host/render_widget_host_view_android.cc (working copy)
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
-#include "content/browser/android/content_view_core_impl.h"
+#include "content/browser/android/content_view_impl.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/android/device_info.h"
@@ -17,13 +17,13 @@
RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
RenderWidgetHostImpl* widget_host,
- ContentViewCoreImpl* content_view_core)
+ ContentViewImpl* content_view)
: host_(widget_host),
- // ContentViewCoreImpl represents the native side of the Java
- // ContentViewCore. It being NULL means that it is not attached to the
- // View system yet, so we treat it as hidden.
- is_hidden_(!content_view_core),
- content_view_core_(content_view_core) {
+ // ContentViewImpl represents the native side of the Java ContentView.
+ // It being NULL means that it is not attached to the View system yet,
+ // so we treat it as hidden.
+ is_hidden_(!content_view),
+ content_view_(content_view) {
host_->SetView(this);
// RenderWidgetHost is initialized as visible. If is_hidden_ is true, tell
// RenderWidgetHost to hide.
@@ -92,7 +92,7 @@
}
gfx::NativeView RenderWidgetHostViewAndroid::GetNativeView() const {
- return content_view_core_;
+ return content_view_;
}
gfx::NativeViewId RenderWidgetHostViewAndroid::GetNativeViewId() const {
@@ -126,10 +126,10 @@
}
bool RenderWidgetHostViewAndroid::HasFocus() const {
- if (!content_view_core_)
- return false; // ContentViewCore not created yet.
+ if (!content_view_)
+ return false; // ContentView not created yet.
- return content_view_core_->HasFocus();
+ return content_view_->HasFocus();
}
bool RenderWidgetHostViewAndroid::IsSurfaceAvailableForCopy() const {
@@ -150,10 +150,10 @@
}
gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
- if (content_view_core_) {
- return content_view_core_->GetBounds();
+ if (content_view_) {
+ return content_view_->GetBounds();
} else {
- // The ContentViewCore has not been created yet. This only happens when
+ // The ContentView has not been created yet. This only happens when
// renderer asks for creating new window, for example,
// javascript window.open().
return gfx::Rect(0, 0, 0, 0);
@@ -194,7 +194,7 @@
}
void RenderWidgetHostViewAndroid::Destroy() {
- content_view_core_ = NULL;
+ content_view_ = NULL;
// The RenderWidgetHost's destruction led here, so don't call it.
host_ = NULL;
@@ -212,7 +212,7 @@
const ui::Range& range) {
RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
- if (text.empty() || range.is_empty() || !content_view_core_)
+ if (text.empty() || range.is_empty() || !content_view_)
return;
size_t pos = range.GetMin() - offset;
size_t n = range.length();
@@ -225,7 +225,7 @@
std::string utf8_selection = UTF16ToUTF8(text.substr(pos, n));
- content_view_core_->OnSelectionChanged(utf8_selection);
+ content_view_->OnSelectionChanged(utf8_selection);
}
BackingStore* RenderWidgetHostViewAndroid::AllocBackingStore(
@@ -249,9 +249,8 @@
void RenderWidgetHostViewAndroid::OnAcceleratedCompositingStateChange() {
const bool activated = host_->is_accelerated_compositing_active();
- if (content_view_core_)
- content_view_core_->OnAcceleratedCompositingStateChange(
- this, activated, false);
+ if (content_view_)
+ content_view_->OnAcceleratedCompositingStateChange(this, activated, false);
}
void RenderWidgetHostViewAndroid::AcceleratedSurfaceBuffersSwapped(
@@ -323,12 +322,12 @@
NOTIMPLEMENTED();
}
-void RenderWidgetHostViewAndroid::SetContentViewCore(
- ContentViewCoreImpl* content_view_core) {
- content_view_core_ = content_view_core;
+void RenderWidgetHostViewAndroid::SetContentView(
+ ContentViewImpl* content_view) {
+ content_view_ = content_view;
if (host_) {
GpuSurfaceTracker::Get()->SetSurfaceHandle(
- host_->surface_id(), content_view_core_ ?
+ host_->surface_id(), content_view_ ?
GetCompositingSurface() : gfx::GLSurfaceHandle());
}
}

Powered by Google App Engine
This is Rietveld 408576698