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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); | 864 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); |
865 } | 865 } |
866 | 866 |
867 void RenderWidgetHostViewAndroid::ImeCancelComposition() { | 867 void RenderWidgetHostViewAndroid::ImeCancelComposition() { |
868 ime_adapter_android_.CancelComposition(); | 868 ime_adapter_android_.CancelComposition(); |
869 } | 869 } |
870 | 870 |
871 void RenderWidgetHostViewAndroid::ImeCompositionRangeChanged( | 871 void RenderWidgetHostViewAndroid::ImeCompositionRangeChanged( |
872 const gfx::Range& range, | 872 const gfx::Range& range, |
873 const std::vector<gfx::Rect>& character_bounds) { | 873 const std::vector<gfx::Rect>& character_bounds) { |
874 // TODO(yukawa): Implement this. | 874 ime_adapter_android_.SetCharacterBounds(character_bounds); |
875 } | 875 } |
876 | 876 |
877 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) { | 877 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) { |
878 ime_adapter_android_.FocusedNodeChanged(is_editable_node); | 878 ime_adapter_android_.FocusedNodeChanged(is_editable_node); |
879 if (selection_controller_) | 879 if (selection_controller_) |
880 selection_controller_->OnSelectionEditable(is_editable_node); | 880 selection_controller_->OnSelectionEditable(is_editable_node); |
881 } | 881 } |
882 | 882 |
883 void RenderWidgetHostViewAndroid::RenderProcessGone( | 883 void RenderWidgetHostViewAndroid::RenderProcessGone( |
884 base::TerminationStatus status, int error_code) { | 884 base::TerminationStatus status, int error_code) { |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 // All offsets and sizes are in CSS pixels. | 1432 // All offsets and sizes are in CSS pixels. |
1433 content_view_core_->UpdateFrameInfo( | 1433 content_view_core_->UpdateFrameInfo( |
1434 frame_metadata.root_scroll_offset, | 1434 frame_metadata.root_scroll_offset, |
1435 frame_metadata.page_scale_factor, | 1435 frame_metadata.page_scale_factor, |
1436 gfx::Vector2dF(frame_metadata.min_page_scale_factor, | 1436 gfx::Vector2dF(frame_metadata.min_page_scale_factor, |
1437 frame_metadata.max_page_scale_factor), | 1437 frame_metadata.max_page_scale_factor), |
1438 frame_metadata.root_layer_size, | 1438 frame_metadata.root_layer_size, |
1439 frame_metadata.scrollable_viewport_size, | 1439 frame_metadata.scrollable_viewport_size, |
1440 frame_metadata.location_bar_offset, | 1440 frame_metadata.location_bar_offset, |
1441 frame_metadata.location_bar_content_translation, | 1441 frame_metadata.location_bar_content_translation, |
1442 is_mobile_optimized); | 1442 is_mobile_optimized, |
| 1443 frame_metadata.selection_start); |
1443 #if defined(VIDEO_HOLE) | 1444 #if defined(VIDEO_HOLE) |
1444 if (host_ && host_->IsRenderView()) { | 1445 if (host_ && host_->IsRenderView()) { |
1445 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( | 1446 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( |
1446 RenderViewHost::From(host_)); | 1447 RenderViewHost::From(host_)); |
1447 WebContentsImpl* web_contents_impl = | 1448 WebContentsImpl* web_contents_impl = |
1448 static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(rvhi)); | 1449 static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(rvhi)); |
1449 if (web_contents_impl) | 1450 if (web_contents_impl) |
1450 web_contents_impl->media_web_contents_observer()->OnFrameInfoUpdated(); | 1451 web_contents_impl->media_web_contents_observer()->OnFrameInfoUpdated(); |
1451 } | 1452 } |
1452 #endif // defined(VIDEO_HOLE) | 1453 #endif // defined(VIDEO_HOLE) |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2116 results->orientationAngle = display.RotationAsDegree(); | 2117 results->orientationAngle = display.RotationAsDegree(); |
2117 results->orientationType = | 2118 results->orientationType = |
2118 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2119 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2119 gfx::DeviceDisplayInfo info; | 2120 gfx::DeviceDisplayInfo info; |
2120 results->depth = info.GetBitsPerPixel(); | 2121 results->depth = info.GetBitsPerPixel(); |
2121 results->depthPerComponent = info.GetBitsPerComponent(); | 2122 results->depthPerComponent = info.GetBitsPerComponent(); |
2122 results->isMonochrome = (results->depthPerComponent == 0); | 2123 results->isMonochrome = (results->depthPerComponent == 0); |
2123 } | 2124 } |
2124 | 2125 |
2125 } // namespace content | 2126 } // namespace content |
OLD | NEW |