Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1589953005: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments in #38 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); 782 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled);
783 } 783 }
784 784
785 void RenderWidgetHostViewAndroid::ImeCancelComposition() { 785 void RenderWidgetHostViewAndroid::ImeCancelComposition() {
786 ime_adapter_android_.CancelComposition(); 786 ime_adapter_android_.CancelComposition();
787 } 787 }
788 788
789 void RenderWidgetHostViewAndroid::ImeCompositionRangeChanged( 789 void RenderWidgetHostViewAndroid::ImeCompositionRangeChanged(
790 const gfx::Range& range, 790 const gfx::Range& range,
791 const std::vector<gfx::Rect>& character_bounds) { 791 const std::vector<gfx::Rect>& character_bounds) {
792 // TODO(yukawa): Implement this. 792 std::vector<gfx::RectF> character_bounds_float;
793 for (const gfx::Rect& rect : character_bounds) {
794 character_bounds_float.emplace_back(rect);
795 }
796 ime_adapter_android_.SetCharacterBounds(character_bounds_float);
793 } 797 }
794 798
795 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) { 799 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) {
796 ime_adapter_android_.FocusedNodeChanged(is_editable_node); 800 ime_adapter_android_.FocusedNodeChanged(is_editable_node);
797 } 801 }
798 802
799 void RenderWidgetHostViewAndroid::RenderProcessGone( 803 void RenderWidgetHostViewAndroid::RenderProcessGone(
800 base::TerminationStatus status, int error_code) { 804 base::TerminationStatus status, int error_code) {
801 Destroy(); 805 Destroy();
802 } 806 }
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 // All offsets and sizes are in CSS pixels. 1305 // All offsets and sizes are in CSS pixels.
1302 content_view_core_->UpdateFrameInfo( 1306 content_view_core_->UpdateFrameInfo(
1303 frame_metadata.root_scroll_offset, 1307 frame_metadata.root_scroll_offset,
1304 frame_metadata.page_scale_factor, 1308 frame_metadata.page_scale_factor,
1305 gfx::Vector2dF(frame_metadata.min_page_scale_factor, 1309 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
1306 frame_metadata.max_page_scale_factor), 1310 frame_metadata.max_page_scale_factor),
1307 frame_metadata.root_layer_size, 1311 frame_metadata.root_layer_size,
1308 frame_metadata.scrollable_viewport_size, 1312 frame_metadata.scrollable_viewport_size,
1309 frame_metadata.location_bar_offset, 1313 frame_metadata.location_bar_offset,
1310 frame_metadata.location_bar_content_translation, 1314 frame_metadata.location_bar_content_translation,
1311 is_mobile_optimized); 1315 is_mobile_optimized,
1316 frame_metadata.selection.start);
1312 #if defined(VIDEO_HOLE) 1317 #if defined(VIDEO_HOLE)
1313 if (host_) { 1318 if (host_) {
1314 WebContents* web_contents = 1319 WebContents* web_contents =
1315 WebContents::FromRenderViewHost(RenderViewHostImpl::From(host_)); 1320 WebContents::FromRenderViewHost(RenderViewHostImpl::From(host_));
1316 if (web_contents) { 1321 if (web_contents) {
1317 MediaWebContentsObserverAndroid::FromWebContents(web_contents) 1322 MediaWebContentsObserverAndroid::FromWebContents(web_contents)
1318 ->OnFrameInfoUpdated(); 1323 ->OnFrameInfoUpdated();
1319 } 1324 }
1320 } 1325 }
1321 #endif // defined(VIDEO_HOLE) 1326 #endif // defined(VIDEO_HOLE)
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 results->orientationAngle = display.RotationAsDegree(); 2026 results->orientationAngle = display.RotationAsDegree();
2022 results->orientationType = 2027 results->orientationType =
2023 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2028 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2024 gfx::DeviceDisplayInfo info; 2029 gfx::DeviceDisplayInfo info;
2025 results->depth = info.GetBitsPerPixel(); 2030 results->depth = info.GetBitsPerPixel();
2026 results->depthPerComponent = info.GetBitsPerComponent(); 2031 results->depthPerComponent = info.GetBitsPerComponent();
2027 results->isMonochrome = (results->depthPerComponent == 0); 2032 results->isMonochrome = (results->depthPerComponent == 0);
2028 } 2033 }
2029 2034
2030 } // namespace content 2035 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698