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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 56643003: Start using FocusedNodedChanged to restartInput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const IPC::Message& message) { 162 const IPC::Message& message) {
163 bool handled = true; 163 bool handled = true;
164 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAndroid, message) 164 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAndroid, message)
165 IPC_MESSAGE_HANDLER(ViewHostMsg_StartContentIntent, OnStartContentIntent) 165 IPC_MESSAGE_HANDLER(ViewHostMsg_StartContentIntent, OnStartContentIntent)
166 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeBodyBackgroundColor, 166 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeBodyBackgroundColor,
167 OnDidChangeBodyBackgroundColor) 167 OnDidChangeBodyBackgroundColor)
168 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrame, 168 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrame,
169 OnSetNeedsBeginFrame) 169 OnSetNeedsBeginFrame)
170 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, 170 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
171 OnTextInputStateChanged) 171 OnTextInputStateChanged)
172 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged,
173 OnFocusedNodeChanged)
172 IPC_MESSAGE_UNHANDLED(handled = false) 174 IPC_MESSAGE_UNHANDLED(handled = false)
173 IPC_END_MESSAGE_MAP() 175 IPC_END_MESSAGE_MAP()
174 return handled; 176 return handled;
175 } 177 }
176 178
177 void RenderWidgetHostViewAndroid::InitAsChild(gfx::NativeView parent_view) { 179 void RenderWidgetHostViewAndroid::InitAsChild(gfx::NativeView parent_view) {
178 NOTIMPLEMENTED(); 180 NOTIMPLEMENTED();
179 } 181 }
180 182
181 void RenderWidgetHostViewAndroid::InitAsPopup( 183 void RenderWidgetHostViewAndroid::InitAsPopup(
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 return; 439 return;
438 440
439 content_view_core_->UpdateImeAdapter( 441 content_view_core_->UpdateImeAdapter(
440 GetNativeImeAdapter(), 442 GetNativeImeAdapter(),
441 static_cast<int>(params.type), 443 static_cast<int>(params.type),
442 params.value, params.selection_start, params.selection_end, 444 params.value, params.selection_start, params.selection_end,
443 params.composition_start, params.composition_end, 445 params.composition_start, params.composition_end,
444 params.show_ime_if_needed, params.require_ack); 446 params.show_ime_if_needed, params.require_ack);
445 } 447 }
446 448
449 void RenderWidgetHostViewAndroid::OnFocusedNodeChanged(bool is_editable_node) {
450 ime_adapter_android_.OnFocusedNodeChanged(is_editable_node);
451 }
452
447 void RenderWidgetHostViewAndroid::OnDidChangeBodyBackgroundColor( 453 void RenderWidgetHostViewAndroid::OnDidChangeBodyBackgroundColor(
448 SkColor color) { 454 SkColor color) {
449 if (cached_background_color_ == color) 455 if (cached_background_color_ == color)
450 return; 456 return;
451 457
452 cached_background_color_ = color; 458 cached_background_color_ = color;
453 if (content_view_core_) 459 if (content_view_core_)
454 content_view_core_->OnBackgroundColorChanged(color); 460 content_view_core_->OnBackgroundColorChanged(color);
455 } 461 }
456 462
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 // RenderWidgetHostView, public: 1407 // RenderWidgetHostView, public:
1402 1408
1403 // static 1409 // static
1404 RenderWidgetHostView* 1410 RenderWidgetHostView*
1405 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1411 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1406 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1412 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1407 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1413 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1408 } 1414 }
1409 1415
1410 } // namespace content 1416 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698