| 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n)); | 804 std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n)); |
| 805 | 805 |
| 806 content_view_core_->OnSelectionChanged(utf8_selection); | 806 content_view_core_->OnSelectionChanged(utf8_selection); |
| 807 } | 807 } |
| 808 | 808 |
| 809 void RenderWidgetHostViewAndroid::SelectionBoundsChanged( | 809 void RenderWidgetHostViewAndroid::SelectionBoundsChanged( |
| 810 const ViewHostMsg_SelectionBounds_Params& params) { | 810 const ViewHostMsg_SelectionBounds_Params& params) { |
| 811 NOTREACHED() << "Selection bounds should be routed through the compositor."; | 811 NOTREACHED() << "Selection bounds should be routed through the compositor."; |
| 812 } | 812 } |
| 813 | 813 |
| 814 void RenderWidgetHostViewAndroid::SetBackgroundOpaque(bool opaque) { | 814 void RenderWidgetHostViewAndroid::SetBackgroundColor(SkColor color) { |
| 815 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); | 815 RenderWidgetHostViewBase::SetBackgroundColor(color); |
| 816 host_->SetBackgroundOpaque(opaque); | 816 host_->SetBackgroundOpaque(GetBackgroundOpaque()); |
| 817 OnDidChangeBodyBackgroundColor(color); |
| 817 } | 818 } |
| 818 | 819 |
| 819 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( | 820 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( |
| 820 const gfx::Rect& src_subrect, | 821 const gfx::Rect& src_subrect, |
| 821 const gfx::Size& dst_size, | 822 const gfx::Size& dst_size, |
| 822 CopyFromCompositingSurfaceCallback& callback, | 823 CopyFromCompositingSurfaceCallback& callback, |
| 823 const SkColorType color_type) { | 824 const SkColorType color_type) { |
| 824 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); | 825 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); |
| 825 if ((!host_ || host_->is_hidden()) || | 826 if ((!host_ || host_->is_hidden()) || |
| 826 !IsReadbackConfigSupported(color_type)) { | 827 !IsReadbackConfigSupported(color_type)) { |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 results->orientationAngle = display.RotationAsDegree(); | 1773 results->orientationAngle = display.RotationAsDegree(); |
| 1773 results->orientationType = | 1774 results->orientationType = |
| 1774 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1775 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1775 gfx::DeviceDisplayInfo info; | 1776 gfx::DeviceDisplayInfo info; |
| 1776 results->depth = info.GetBitsPerPixel(); | 1777 results->depth = info.GetBitsPerPixel(); |
| 1777 results->depthPerComponent = info.GetBitsPerComponent(); | 1778 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1778 results->isMonochrome = (results->depthPerComponent == 0); | 1779 results->isMonochrome = (results->depthPerComponent == 0); |
| 1779 } | 1780 } |
| 1780 | 1781 |
| 1781 } // namespace content | 1782 } // namespace content |
| OLD | NEW |