| 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n)); | 814 std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n)); |
| 815 | 815 |
| 816 content_view_core_->OnSelectionChanged(utf8_selection); | 816 content_view_core_->OnSelectionChanged(utf8_selection); |
| 817 } | 817 } |
| 818 | 818 |
| 819 void RenderWidgetHostViewAndroid::SelectionBoundsChanged( | 819 void RenderWidgetHostViewAndroid::SelectionBoundsChanged( |
| 820 const ViewHostMsg_SelectionBounds_Params& params) { | 820 const ViewHostMsg_SelectionBounds_Params& params) { |
| 821 NOTREACHED() << "Selection bounds should be routed through the compositor."; | 821 NOTREACHED() << "Selection bounds should be routed through the compositor."; |
| 822 } | 822 } |
| 823 | 823 |
| 824 void RenderWidgetHostViewAndroid::SetBackgroundOpaque(bool opaque) { | 824 void RenderWidgetHostViewAndroid::SetBackgroundColor(SkColor color) { |
| 825 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); | 825 RenderWidgetHostViewBase::SetBackgroundColor(color); |
| 826 host_->SetBackgroundOpaque(opaque); | 826 host_->SetBackgroundOpaque(GetBackgroundOpaque()); |
| 827 OnDidChangeBodyBackgroundColor(color); |
| 827 } | 828 } |
| 828 | 829 |
| 829 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( | 830 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( |
| 830 const gfx::Rect& src_subrect, | 831 const gfx::Rect& src_subrect, |
| 831 const gfx::Size& dst_size, | 832 const gfx::Size& dst_size, |
| 832 CopyFromCompositingSurfaceCallback& callback, | 833 CopyFromCompositingSurfaceCallback& callback, |
| 833 const SkColorType color_type) { | 834 const SkColorType color_type) { |
| 834 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); | 835 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); |
| 835 if ((!host_ || host_->is_hidden()) || | 836 if ((!host_ || host_->is_hidden()) || |
| 836 !IsReadbackConfigSupported(color_type)) { | 837 !IsReadbackConfigSupported(color_type)) { |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 results->orientationAngle = display.RotationAsDegree(); | 1794 results->orientationAngle = display.RotationAsDegree(); |
| 1794 results->orientationType = | 1795 results->orientationType = |
| 1795 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1796 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1796 gfx::DeviceDisplayInfo info; | 1797 gfx::DeviceDisplayInfo info; |
| 1797 results->depth = info.GetBitsPerPixel(); | 1798 results->depth = info.GetBitsPerPixel(); |
| 1798 results->depthPerComponent = info.GetBitsPerComponent(); | 1799 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1799 results->isMonochrome = (results->depthPerComponent == 0); | 1800 results->isMonochrome = (results->depthPerComponent == 0); |
| 1800 } | 1801 } |
| 1801 | 1802 |
| 1802 } // namespace content | 1803 } // namespace content |
| OLD | NEW |