Chromium Code Reviews| 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 <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 489 CreateOverscrollControllerIfPossible(); | 489 CreateOverscrollControllerIfPossible(); |
| 490 | 490 |
| 491 if (GetTextInputManager()) | 491 if (GetTextInputManager()) |
| 492 GetTextInputManager()->AddObserver(this); | 492 GetTextInputManager()->AddObserver(this); |
| 493 } | 493 } |
| 494 | 494 |
| 495 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { | 495 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { |
| 496 if (content_view_core_) | 496 if (content_view_core_) |
| 497 content_view_core_->RemoveObserver(this); | 497 content_view_core_->RemoveObserver(this); |
| 498 SetContentViewCore(NULL); | 498 SetContentViewCore(NULL); |
| 499 if (ime_adapter_android_) | 499 if (ime_adapter_android_) { |
| 500 ime_adapter_android_->ResetRenderWidgetHostView(this); | |
|
boliu
2017/04/11 15:16:13
no I mean this should be render_widget_host_connec
| |
| 500 ime_adapter_android_ = nullptr; | 501 ime_adapter_android_ = nullptr; |
| 502 } | |
| 501 DCHECK(ack_callbacks_.empty()); | 503 DCHECK(ack_callbacks_.empty()); |
| 502 DCHECK(!delegated_frame_host_); | 504 DCHECK(!delegated_frame_host_); |
| 503 } | 505 } |
| 504 | 506 |
| 505 void RenderWidgetHostViewAndroid::Blur() { | 507 void RenderWidgetHostViewAndroid::Blur() { |
| 506 host_->Blur(); | 508 host_->Blur(); |
| 507 if (overscroll_controller_) | 509 if (overscroll_controller_) |
| 508 overscroll_controller_->Disable(); | 510 overscroll_controller_->Disable(); |
| 509 } | 511 } |
| 510 | 512 |
| (...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2175 | 2177 |
| 2176 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2178 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2177 if (!compositor) | 2179 if (!compositor) |
| 2178 return; | 2180 return; |
| 2179 | 2181 |
| 2180 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2182 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2181 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2183 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2182 } | 2184 } |
| 2183 | 2185 |
| 2184 } // namespace content | 2186 } // namespace content |
| OLD | NEW |