| 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 if (pos >= text.length()) { | 801 if (pos >= text.length()) { |
| 802 NOTREACHED() << "The text can not cover range."; | 802 NOTREACHED() << "The text can not cover range."; |
| 803 return; | 803 return; |
| 804 } | 804 } |
| 805 | 805 |
| 806 std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n)); | 806 std::string utf8_selection = base::UTF16ToUTF8(text.substr(pos, n)); |
| 807 | 807 |
| 808 content_view_core_->OnSelectionChanged(utf8_selection); | 808 content_view_core_->OnSelectionChanged(utf8_selection); |
| 809 } | 809 } |
| 810 | 810 |
| 811 void RenderWidgetHostViewAndroid::SelectionBoundsChanged( | |
| 812 const ViewHostMsg_SelectionBounds_Params& params) { | |
| 813 NOTREACHED() << "Selection bounds should be routed through the compositor."; | |
| 814 } | |
| 815 | |
| 816 void RenderWidgetHostViewAndroid::SetBackgroundColor(SkColor color) { | 811 void RenderWidgetHostViewAndroid::SetBackgroundColor(SkColor color) { |
| 817 RenderWidgetHostViewBase::SetBackgroundColor(color); | 812 RenderWidgetHostViewBase::SetBackgroundColor(color); |
| 818 host_->SetBackgroundOpaque(GetBackgroundOpaque()); | 813 host_->SetBackgroundOpaque(GetBackgroundOpaque()); |
| 819 UpdateBackgroundColor(color); | 814 UpdateBackgroundColor(color); |
| 820 } | 815 } |
| 821 | 816 |
| 822 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( | 817 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( |
| 823 const gfx::Rect& src_subrect, | 818 const gfx::Rect& src_subrect, |
| 824 const gfx::Size& dst_size, | 819 const gfx::Size& dst_size, |
| 825 const ReadbackRequestCallback& callback, | 820 const ReadbackRequestCallback& callback, |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 case ui::MotionEvent::ACTION_UP: | 1852 case ui::MotionEvent::ACTION_UP: |
| 1858 case ui::MotionEvent::ACTION_POINTER_UP: | 1853 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1859 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1854 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1860 delta.InMicroseconds(), 1, 1000000, 50); | 1855 delta.InMicroseconds(), 1, 1000000, 50); |
| 1861 default: | 1856 default: |
| 1862 return; | 1857 return; |
| 1863 } | 1858 } |
| 1864 } | 1859 } |
| 1865 | 1860 |
| 1866 } // namespace content | 1861 } // namespace content |
| OLD | NEW |