OnDidChangeBodyBackgroundColor)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrame,
OnSetNeedsBeginFrame)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
+ OnTextInputStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_SmartClipDataExtracted,
OnSmartClipDataExtracted)
IPC_MESSAGE_UNHANDLED(handled = false)
// is TabContentsDelegate.
}
+void RenderWidgetHostViewAndroid::TextInputTypeChanged(
+ ui::TextInputType type,
+ ui::TextInputMode input_mode,
+ bool can_compose_inline) {
+ // Unused on Android, which uses OnTextInputChanged instead.
+}
+
long RenderWidgetHostViewAndroid::GetNativeImeAdapter() {
return reinterpret_cast<intptr_t>(&ime_adapter_android_);
}
-void RenderWidgetHostViewAndroid::TextInputStateChanged(
+void RenderWidgetHostViewAndroid::OnTextInputStateChanged(
const ViewHostMsg_TextInputState_Params& params) {
if (selection_controller_) {
// This call is semi-redundant with that in |OnFocusedNodeChanged|. The
void RenderWidgetHostViewAndroid::SynchronousFrameMetadata(
const cc::CompositorFrameMetadata& frame_metadata) {
+ if (!content_view_core_)
+ return;
+
// This is a subset of OnSwapCompositorFrame() used in the synchronous
// compositor flow.
OnFrameMetadataUpdated(frame_metadata);
if (!content_view_core_)
return;
- DCHECK(selection_controller_);
- selection_controller_->OnSelectionBoundsChanged(
- frame_metadata.selection_start, frame_metadata.selection_end);
+ if (selection_controller_) {
+ selection_controller_->OnSelectionBoundsChanged(
+ frame_metadata.selection_start, frame_metadata.selection_end);
+ }
// All offsets and sizes are in CSS pixels.
content_view_core_->UpdateFrameInfo(
BrowserAccessibilityManager*
RenderWidgetHostViewAndroid::CreateBrowserAccessibilityManager(
BrowserAccessibilityDelegate* delegate) {
+ // TODO(dmazzoni): Currently there can only be one
+ // BrowserAccessibilityManager per ContentViewCore, so return NULL
+ // if there's already a BrowserAccessibilityManager for the main
+ // frame. Eventually, in order to support cross-process iframes on
+ // Android we'll need to add support for a
+ // BrowserAccessibilityManager for a child frame.
+ // http://crbug.com/423846
+ if (!host_ || host_->GetRootBrowserAccessibilityManager())
+ return NULL;
+
base::android::ScopedJavaLocalRef<jobject> obj;
if (content_view_core_)
obj = content_view_core_->GetJavaObject();