| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_ = nullptr; | 500 ime_adapter_android_ = nullptr; |
| 501 for (auto* observer : destruction_observers_) |
| 502 observer->RenderWidgetHostViewDestroyed(this); |
| 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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 | 2181 |
| 2180 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2182 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2181 if (!compositor) | 2183 if (!compositor) |
| 2182 return; | 2184 return; |
| 2183 | 2185 |
| 2184 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2186 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2185 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2187 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2186 } | 2188 } |
| 2187 | 2189 |
| 2188 } // namespace content | 2190 } // namespace content |
| OLD | NEW |