| 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/android/build_info.h" | 9 #include "base/android/build_info.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 void RenderWidgetHostViewAndroid::ImeCancelComposition() { | 727 void RenderWidgetHostViewAndroid::ImeCancelComposition() { |
| 728 ime_adapter_android_.CancelComposition(); | 728 ime_adapter_android_.CancelComposition(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) { | 731 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) { |
| 732 ime_adapter_android_.FocusedNodeChanged(is_editable_node); | 732 ime_adapter_android_.FocusedNodeChanged(is_editable_node); |
| 733 if (selection_controller_) | 733 if (selection_controller_) |
| 734 selection_controller_->OnSelectionEditable(is_editable_node); | 734 selection_controller_->OnSelectionEditable(is_editable_node); |
| 735 } | 735 } |
| 736 | 736 |
| 737 void RenderWidgetHostViewAndroid::RenderProcessGone( | |
| 738 base::TerminationStatus status, int error_code) { | |
| 739 Destroy(); | |
| 740 } | |
| 741 | |
| 742 void RenderWidgetHostViewAndroid::Destroy() { | 737 void RenderWidgetHostViewAndroid::Destroy() { |
| 743 RemoveLayers(); | 738 RemoveLayers(); |
| 744 SetContentViewCore(NULL); | 739 SetContentViewCore(NULL); |
| 745 | 740 |
| 746 // The RenderWidgetHost's destruction led here, so don't call it. | 741 host_->ViewDestroyed(this); |
| 747 host_ = NULL; | 742 host_ = NULL; |
| 748 | |
| 749 delete this; | 743 delete this; |
| 750 } | 744 } |
| 751 | 745 |
| 752 void RenderWidgetHostViewAndroid::SetTooltipText( | 746 void RenderWidgetHostViewAndroid::SetTooltipText( |
| 753 const base::string16& tooltip_text) { | 747 const base::string16& tooltip_text) { |
| 754 // Tooltips don't makes sense on Android. | 748 // Tooltips don't makes sense on Android. |
| 755 } | 749 } |
| 756 | 750 |
| 757 void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text, | 751 void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text, |
| 758 size_t offset, | 752 size_t offset, |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 results->orientationAngle = display.RotationAsDegree(); | 1850 results->orientationAngle = display.RotationAsDegree(); |
| 1857 results->orientationType = | 1851 results->orientationType = |
| 1858 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1852 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1859 gfx::DeviceDisplayInfo info; | 1853 gfx::DeviceDisplayInfo info; |
| 1860 results->depth = info.GetBitsPerPixel(); | 1854 results->depth = info.GetBitsPerPixel(); |
| 1861 results->depthPerComponent = info.GetBitsPerComponent(); | 1855 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1862 results->isMonochrome = (results->depthPerComponent == 0); | 1856 results->isMonochrome = (results->depthPerComponent == 0); |
| 1863 } | 1857 } |
| 1864 | 1858 |
| 1865 } // namespace content | 1859 } // namespace content |
| OLD | NEW |