| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { | 279 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { |
| 280 // Do nothing. The UI notification is handled through ContentViewClient which | 280 // Do nothing. The UI notification is handled through ContentViewClient which |
| 281 // is TabContentsDelegate. | 281 // is TabContentsDelegate. |
| 282 } | 282 } |
| 283 | 283 |
| 284 void RenderWidgetHostViewAndroid::TextInputStateChanged( | 284 void RenderWidgetHostViewAndroid::TextInputStateChanged( |
| 285 const ViewHostMsg_TextInputState_Params& params) { | 285 const ViewHostMsg_TextInputState_Params& params) { |
| 286 if (!IsShowing()) | 286 if (!IsShowing()) |
| 287 return; | 287 return; |
| 288 | 288 |
| 289 // TODO(miguelg): this currently dispatches messages for text inputs | |
| 290 // and date/time value inputs. Split it into two adapters. | |
| 291 content_view_core_->ImeUpdateAdapter( | 289 content_view_core_->ImeUpdateAdapter( |
| 292 GetNativeImeAdapter(), | 290 GetNativeImeAdapter(), |
| 293 static_cast<int>(params.type), | 291 static_cast<int>(params.type), |
| 294 params.value, params.selection_start, params.selection_end, | 292 params.value, params.selection_start, params.selection_end, |
| 295 params.composition_start, params.composition_end, | 293 params.composition_start, params.composition_end, |
| 296 params.show_ime_if_needed); | 294 params.show_ime_if_needed); |
| 297 } | 295 } |
| 298 | 296 |
| 299 int RenderWidgetHostViewAndroid::GetNativeImeAdapter() { | 297 int RenderWidgetHostViewAndroid::GetNativeImeAdapter() { |
| 300 return reinterpret_cast<int>(&ime_adapter_android_); | 298 return reinterpret_cast<int>(&ime_adapter_android_); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 // RenderWidgetHostView, public: | 642 // RenderWidgetHostView, public: |
| 645 | 643 |
| 646 // static | 644 // static |
| 647 RenderWidgetHostView* | 645 RenderWidgetHostView* |
| 648 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 646 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 649 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 647 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 650 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 648 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 651 } | 649 } |
| 652 | 650 |
| 653 } // namespace content | 651 } // namespace content |
| OLD | NEW |