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

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

Issue 699333003: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the core logic into Java side Created 5 years, 10 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 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); 833 gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled);
834 } 834 }
835 835
836 void RenderWidgetHostViewAndroid::ImeCancelComposition() { 836 void RenderWidgetHostViewAndroid::ImeCancelComposition() {
837 ime_adapter_android_.CancelComposition(); 837 ime_adapter_android_.CancelComposition();
838 } 838 }
839 839
840 void RenderWidgetHostViewAndroid::ImeCompositionRangeChanged( 840 void RenderWidgetHostViewAndroid::ImeCompositionRangeChanged(
841 const gfx::Range& range, 841 const gfx::Range& range,
842 const std::vector<gfx::Rect>& character_bounds) { 842 const std::vector<gfx::Rect>& character_bounds) {
843 // TODO(yukawa): Implement this. 843 ime_adapter_android_.SetCharacterBounds(character_bounds);
844 } 844 }
845 845
846 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) { 846 void RenderWidgetHostViewAndroid::FocusedNodeChanged(bool is_editable_node) {
847 ime_adapter_android_.FocusedNodeChanged(is_editable_node); 847 ime_adapter_android_.FocusedNodeChanged(is_editable_node);
848 if (selection_controller_) 848 if (selection_controller_)
849 selection_controller_->OnSelectionEditable(is_editable_node); 849 selection_controller_->OnSelectionEditable(is_editable_node);
850 } 850 }
851 851
852 void RenderWidgetHostViewAndroid::RenderProcessGone( 852 void RenderWidgetHostViewAndroid::RenderProcessGone(
853 base::TerminationStatus status, int error_code) { 853 base::TerminationStatus status, int error_code) {
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 1328
1329 // All offsets and sizes are in CSS pixels. 1329 // All offsets and sizes are in CSS pixels.
1330 content_view_core_->UpdateFrameInfo( 1330 content_view_core_->UpdateFrameInfo(
1331 frame_metadata.root_scroll_offset, 1331 frame_metadata.root_scroll_offset,
1332 frame_metadata.page_scale_factor, 1332 frame_metadata.page_scale_factor,
1333 gfx::Vector2dF(frame_metadata.min_page_scale_factor, 1333 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
1334 frame_metadata.max_page_scale_factor), 1334 frame_metadata.max_page_scale_factor),
1335 frame_metadata.root_layer_size, 1335 frame_metadata.root_layer_size,
1336 frame_metadata.scrollable_viewport_size, 1336 frame_metadata.scrollable_viewport_size,
1337 frame_metadata.location_bar_offset, 1337 frame_metadata.location_bar_offset,
1338 frame_metadata.location_bar_content_translation); 1338 frame_metadata.location_bar_content_translation,
1339 frame_metadata.selection_start);
1339 #if defined(VIDEO_HOLE) 1340 #if defined(VIDEO_HOLE)
1340 if (host_ && host_->IsRenderView()) { 1341 if (host_ && host_->IsRenderView()) {
1341 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>( 1342 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(
1342 RenderViewHost::From(host_)); 1343 RenderViewHost::From(host_));
1343 WebContentsImpl* web_contents_impl = 1344 WebContentsImpl* web_contents_impl =
1344 static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(rvhi)); 1345 static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(rvhi));
1345 if (web_contents_impl) 1346 if (web_contents_impl)
1346 web_contents_impl->media_web_contents_observer()->OnFrameInfoUpdated(); 1347 web_contents_impl->media_web_contents_observer()->OnFrameInfoUpdated();
1347 } 1348 }
1348 #endif // defined(VIDEO_HOLE) 1349 #endif // defined(VIDEO_HOLE)
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 results->orientationAngle = display.RotationAsDegree(); 1913 results->orientationAngle = display.RotationAsDegree();
1913 results->orientationType = 1914 results->orientationType =
1914 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1915 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1915 gfx::DeviceDisplayInfo info; 1916 gfx::DeviceDisplayInfo info;
1916 results->depth = info.GetBitsPerPixel(); 1917 results->depth = info.GetBitsPerPixel();
1917 results->depthPerComponent = info.GetBitsPerComponent(); 1918 results->depthPerComponent = info.GetBitsPerComponent();
1918 results->isMonochrome = (results->depthPerComponent == 0); 1919 results->isMonochrome = (results->depthPerComponent == 0);
1919 } 1920 }
1920 1921
1921 } // namespace content 1922 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698