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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2508363003: [refactor] - Move textInputInfo() and textInputType() from WebWidget to WebInputMethodController (Closed)
Patch Set: Fixed Rebase Created 3 years, 12 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
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 } 1863 }
1864 1864
1865 // TODO(ananta): Piggyback off existing IPCs to communicate this information, 1865 // TODO(ananta): Piggyback off existing IPCs to communicate this information,
1866 // crbug/420130. 1866 // crbug/420130.
1867 #if defined(OS_WIN) 1867 #if defined(OS_WIN)
1868 if (event.type != blink::WebGestureEvent::GestureTap) 1868 if (event.type != blink::WebGestureEvent::GestureTap)
1869 return; 1869 return;
1870 1870
1871 // TODO(estade): hit test the event against focused node to make sure 1871 // TODO(estade): hit test the event against focused node to make sure
1872 // the tap actually hit the focused node. 1872 // the tap actually hit the focused node.
1873 blink::WebTextInputType text_input_type = GetWebView()->textInputType(); 1873 blink::WebLocalFrame* focused = GetWebView()->focusedFrame();
1874 blink::WebTextInputType text_input_type =
1875 focused ? focused->inputMethodController()->textInputType()
1876 : blink::WebTextInputTypeNone;
1874 1877
1875 Send(new ViewHostMsg_FocusedNodeTouched( 1878 Send(new ViewHostMsg_FocusedNodeTouched(
1876 GetRoutingID(), text_input_type != blink::WebTextInputTypeNone)); 1879 GetRoutingID(), text_input_type != blink::WebTextInputTypeNone));
1877 #endif 1880 #endif
1878 } 1881 }
1879 1882
1880 void RenderViewImpl::initializeLayerTreeView() { 1883 void RenderViewImpl::initializeLayerTreeView() {
1881 RenderWidget::initializeLayerTreeView(); 1884 RenderWidget::initializeLayerTreeView();
1882 RenderWidgetCompositor* rwc = compositor(); 1885 RenderWidgetCompositor* rwc = compositor();
1883 if (!rwc) 1886 if (!rwc)
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2823 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2826 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2824 } 2827 }
2825 2828
2826 std::unique_ptr<InputEventAck> ack( 2829 std::unique_ptr<InputEventAck> ack(
2827 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2830 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2828 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2831 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2829 OnInputEventAck(std::move(ack)); 2832 OnInputEventAck(std::move(ack));
2830 } 2833 }
2831 2834
2832 } // namespace content 2835 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698