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

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 #36. Added ImeLollipopTest for IMMEDIATE case. 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 // All offsets and sizes are in CSS pixels. 1314 // All offsets and sizes are in CSS pixels.
1311 content_view_core_->UpdateFrameInfo( 1315 content_view_core_->UpdateFrameInfo(
1312 frame_metadata.root_scroll_offset, 1316 frame_metadata.root_scroll_offset,
1313 frame_metadata.page_scale_factor, 1317 frame_metadata.page_scale_factor,
1314 gfx::Vector2dF(frame_metadata.min_page_scale_factor, 1318 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
1315 frame_metadata.max_page_scale_factor), 1319 frame_metadata.max_page_scale_factor),
1316 frame_metadata.root_layer_size, 1320 frame_metadata.root_layer_size,
1317 frame_metadata.scrollable_viewport_size, 1321 frame_metadata.scrollable_viewport_size,
1318 frame_metadata.location_bar_offset, 1322 frame_metadata.location_bar_offset,
1319 frame_metadata.location_bar_content_translation, 1323 frame_metadata.location_bar_content_translation,
1320 is_mobile_optimized); 1324 is_mobile_optimized,
1325 frame_metadata.selection.start);
1321 #if defined(VIDEO_HOLE) 1326 #if defined(VIDEO_HOLE)
1322 if (host_) { 1327 if (host_) {
1323 WebContents* web_contents = 1328 WebContents* web_contents =
1324 WebContents::FromRenderViewHost(RenderViewHostImpl::From(host_)); 1329 WebContents::FromRenderViewHost(RenderViewHostImpl::From(host_));
1325 if (web_contents) { 1330 if (web_contents) {
1326 MediaWebContentsObserverAndroid::FromWebContents(web_contents) 1331 MediaWebContentsObserverAndroid::FromWebContents(web_contents)
1327 ->OnFrameInfoUpdated(); 1332 ->OnFrameInfoUpdated();
1328 } 1333 }
1329 } 1334 }
1330 #endif // defined(VIDEO_HOLE) 1335 #endif // defined(VIDEO_HOLE)
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 results->orientationAngle = display.RotationAsDegree(); 2049 results->orientationAngle = display.RotationAsDegree();
2045 results->orientationType = 2050 results->orientationType =
2046 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2051 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2047 gfx::DeviceDisplayInfo info; 2052 gfx::DeviceDisplayInfo info;
2048 results->depth = info.GetBitsPerPixel(); 2053 results->depth = info.GetBitsPerPixel();
2049 results->depthPerComponent = info.GetBitsPerComponent(); 2054 results->depthPerComponent = info.GetBitsPerComponent();
2050 results->isMonochrome = (results->depthPerComponent == 0); 2055 results->isMonochrome = (results->depthPerComponent == 0);
2051 } 2056 }
2052 2057
2053 } // namespace content 2058 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698