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::SetBackgroundColor(SkColor color) { | 814 void RenderWidgetHostViewAndroid::SetBackgroundOpaque(bool opaque) { |
815 RenderWidgetHostViewBase::SetBackgroundColor(color); | 815 RenderWidgetHostViewBase::SetBackgroundOpaque(opaque); |
816 host_->SetBackgroundOpaque(GetBackgroundOpaque()); | 816 host_->SetBackgroundOpaque(opaque); |
817 OnDidChangeBodyBackgroundColor(color); | |
818 } | 817 } |
819 | 818 |
820 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( | 819 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( |
821 const gfx::Rect& src_subrect, | 820 const gfx::Rect& src_subrect, |
822 const gfx::Size& dst_size, | 821 const gfx::Size& dst_size, |
823 CopyFromCompositingSurfaceCallback& callback, | 822 CopyFromCompositingSurfaceCallback& callback, |
824 const SkColorType color_type) { | 823 const SkColorType color_type) { |
825 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); | 824 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); |
826 if ((!host_ || host_->is_hidden()) || | 825 if ((!host_ || host_->is_hidden()) || |
827 !IsReadbackConfigSupported(color_type)) { | 826 !IsReadbackConfigSupported(color_type)) { |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 results->orientationAngle = display.RotationAsDegree(); | 1772 results->orientationAngle = display.RotationAsDegree(); |
1774 results->orientationType = | 1773 results->orientationType = |
1775 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1774 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1776 gfx::DeviceDisplayInfo info; | 1775 gfx::DeviceDisplayInfo info; |
1777 results->depth = info.GetBitsPerPixel(); | 1776 results->depth = info.GetBitsPerPixel(); |
1778 results->depthPerComponent = info.GetBitsPerComponent(); | 1777 results->depthPerComponent = info.GetBitsPerComponent(); |
1779 results->isMonochrome = (results->depthPerComponent == 0); | 1778 results->isMonochrome = (results->depthPerComponent == 0); |
1780 } | 1779 } |
1781 | 1780 |
1782 } // namespace content | 1781 } // namespace content |
OLD | NEW |