| 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 #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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { | 269 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { |
| 270 // Do nothing. The UI notification is handled through ContentViewClient which | 270 // Do nothing. The UI notification is handled through ContentViewClient which |
| 271 // is TabContentsDelegate. | 271 // is TabContentsDelegate. |
| 272 } | 272 } |
| 273 | 273 |
| 274 void RenderWidgetHostViewAndroid::TextInputStateChanged( | 274 void RenderWidgetHostViewAndroid::TextInputStateChanged( |
| 275 const ViewHostMsg_TextInputState_Params& params) { | 275 const ViewHostMsg_TextInputState_Params& params) { |
| 276 if (!IsShowing()) | 276 if (!IsShowing()) |
| 277 return; | 277 return; |
| 278 | 278 |
| 279 // TODO(miguelg): this currently dispatches messages for text inputs |
| 280 // and date/time value inputs. Split it into two adapters. |
| 279 content_view_core_->ImeUpdateAdapter( | 281 content_view_core_->ImeUpdateAdapter( |
| 280 GetNativeImeAdapter(), | 282 GetNativeImeAdapter(), |
| 281 static_cast<int>(params.type), | 283 static_cast<int>(params.type), |
| 282 params.value, params.selection_start, params.selection_end, | 284 params.value, params.selection_start, params.selection_end, |
| 283 params.composition_start, params.composition_end, | 285 params.composition_start, params.composition_end, |
| 284 params.show_ime_if_needed); | 286 params.show_ime_if_needed); |
| 285 } | 287 } |
| 286 | 288 |
| 287 int RenderWidgetHostViewAndroid::GetNativeImeAdapter() { | 289 int RenderWidgetHostViewAndroid::GetNativeImeAdapter() { |
| 288 return reinterpret_cast<int>(&ime_adapter_android_); | 290 return reinterpret_cast<int>(&ime_adapter_android_); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 // RenderWidgetHostView, public: | 643 // RenderWidgetHostView, public: |
| 642 | 644 |
| 643 // static | 645 // static |
| 644 RenderWidgetHostView* | 646 RenderWidgetHostView* |
| 645 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 647 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 646 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 648 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 647 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 649 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 648 } | 650 } |
| 649 | 651 |
| 650 } // namespace content | 652 } // namespace content |
| OLD | NEW |