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

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

Issue 2766053002: [refactor] Fix autofill features for payments when the form is inside an OOPIF (Closed)
Patch Set: Addressing vabr@'s comments Created 3 years, 8 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_impl.cc ('k') | content/renderer/render_widget_owner_delegate.h » ('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_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "third_party/WebKit/public/platform/WebCursorInfo.h" 70 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
71 #include "third_party/WebKit/public/platform/WebDragData.h" 71 #include "third_party/WebKit/public/platform/WebDragData.h"
72 #include "third_party/WebKit/public/platform/WebDragOperation.h" 72 #include "third_party/WebKit/public/platform/WebDragOperation.h"
73 #include "third_party/WebKit/public/platform/WebMouseEvent.h" 73 #include "third_party/WebKit/public/platform/WebMouseEvent.h"
74 #include "third_party/WebKit/public/platform/WebPoint.h" 74 #include "third_party/WebKit/public/platform/WebPoint.h"
75 #include "third_party/WebKit/public/platform/WebRect.h" 75 #include "third_party/WebKit/public/platform/WebRect.h"
76 #include "third_party/WebKit/public/platform/WebSize.h" 76 #include "third_party/WebKit/public/platform/WebSize.h"
77 #include "third_party/WebKit/public/platform/WebString.h" 77 #include "third_party/WebKit/public/platform/WebString.h"
78 #include "third_party/WebKit/public/platform/scheduler/renderer/render_widget_sc heduling_state.h" 78 #include "third_party/WebKit/public/platform/scheduler/renderer/render_widget_sc heduling_state.h"
79 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h" 79 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h"
80 #include "third_party/WebKit/public/web/WebAutofillClient.h"
80 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" 81 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
81 #include "third_party/WebKit/public/web/WebFrameWidget.h" 82 #include "third_party/WebKit/public/web/WebFrameWidget.h"
82 #include "third_party/WebKit/public/web/WebInputMethodController.h" 83 #include "third_party/WebKit/public/web/WebInputMethodController.h"
83 #include "third_party/WebKit/public/web/WebLocalFrame.h" 84 #include "third_party/WebKit/public/web/WebLocalFrame.h"
84 #include "third_party/WebKit/public/web/WebNode.h" 85 #include "third_party/WebKit/public/web/WebNode.h"
85 #include "third_party/WebKit/public/web/WebPagePopup.h" 86 #include "third_party/WebKit/public/web/WebPagePopup.h"
86 #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" 87 #include "third_party/WebKit/public/web/WebPopupMenuInfo.h"
87 #include "third_party/WebKit/public/web/WebRange.h" 88 #include "third_party/WebKit/public/web/WebRange.h"
88 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 89 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
89 #include "third_party/WebKit/public/web/WebView.h" 90 #include "third_party/WebKit/public/web/WebView.h"
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 std::unique_ptr<cc::SwapPromise> RenderWidget::RequestCopyOfOutputForLayoutTest( 975 std::unique_ptr<cc::SwapPromise> RenderWidget::RequestCopyOfOutputForLayoutTest(
975 std::unique_ptr<cc::CopyOutputRequest> request) { 976 std::unique_ptr<cc::CopyOutputRequest> request) {
976 return RenderThreadImpl::current()->RequestCopyOfOutputForLayoutTest( 977 return RenderThreadImpl::current()->RequestCopyOfOutputForLayoutTest(
977 routing_id_, std::move(request)); 978 routing_id_, std::move(request));
978 } 979 }
979 980
980 /////////////////////////////////////////////////////////////////////////////// 981 ///////////////////////////////////////////////////////////////////////////////
981 // RenderWidgetInputHandlerDelegate 982 // RenderWidgetInputHandlerDelegate
982 983
983 void RenderWidget::FocusChangeComplete() { 984 void RenderWidget::FocusChangeComplete() {
984 if (owner_delegate_) 985 if (!GetWebWidget()->IsWebFrameWidget())
985 owner_delegate_->RenderWidgetFocusChangeComplete(); 986 return;
987 blink::WebLocalFrame* focused =
988 static_cast<blink::WebFrameWidget*>(GetWebWidget())
989 ->LocalRoot()
990 ->View()
991 ->FocusedFrame();
992 if (focused && focused->AutofillClient())
993 focused->AutofillClient()->DidCompleteFocusChangeInFrame();
986 } 994 }
987 995
988 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 996 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
989 if (owner_delegate_) 997 if (owner_delegate_)
990 return owner_delegate_->DoesRenderWidgetHaveTouchEventHandlersAt(point); 998 return owner_delegate_->DoesRenderWidgetHaveTouchEventHandlersAt(point);
991 999
992 return true; 1000 return true;
993 } 1001 }
994 1002
995 void RenderWidget::ObserveGestureEventAndResult( 1003 void RenderWidget::ObserveGestureEventAndResult(
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 // mouse button or the finger and a text input element is focused at that 1806 // mouse button or the finger and a text input element is focused at that
1799 // time. Focus event itself shouldn't trigger virtual keyboard. 1807 // time. Focus event itself shouldn't trigger virtual keyboard.
1800 UpdateTextInputState(); 1808 UpdateTextInputState();
1801 #else 1809 #else
1802 ShowVirtualKeyboard(); 1810 ShowVirtualKeyboard();
1803 #endif 1811 #endif
1804 1812
1805 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with 1813 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with
1806 // virtual keyboard. 1814 // virtual keyboard.
1807 #if !defined(OS_ANDROID) 1815 #if !defined(OS_ANDROID)
1808 FocusChangeComplete(); 1816 FocusChangeComplete();
EhsanK 2017/04/20 14:17:44 This is yet another case where we come from blink
1809 #endif 1817 #endif
1810 } 1818 }
1811 1819
1812 ui::TextInputType RenderWidget::GetTextInputType() { 1820 ui::TextInputType RenderWidget::GetTextInputType() {
1813 #if BUILDFLAG(ENABLE_PLUGINS) 1821 #if BUILDFLAG(ENABLE_PLUGINS)
1814 if (focused_pepper_plugin_) 1822 if (focused_pepper_plugin_)
1815 return focused_pepper_plugin_->text_input_type(); 1823 return focused_pepper_plugin_->text_input_type();
1816 #endif 1824 #endif
1817 if (auto* controller = GetInputMethodController()) 1825 if (auto* controller = GetInputMethodController())
1818 return ConvertWebTextInputType(controller->TextInputType()); 1826 return ConvertWebTextInputType(controller->TextInputType());
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 // browser side (https://crbug.com/669219). 2322 // browser side (https://crbug.com/669219).
2315 // If there is no WebFrameWidget, then there will be no 2323 // If there is no WebFrameWidget, then there will be no
2316 // InputMethodControllers for a WebLocalFrame. 2324 // InputMethodControllers for a WebLocalFrame.
2317 return nullptr; 2325 return nullptr;
2318 } 2326 }
2319 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) 2327 return static_cast<blink::WebFrameWidget*>(GetWebWidget())
2320 ->GetActiveWebInputMethodController(); 2328 ->GetActiveWebInputMethodController();
2321 } 2329 }
2322 2330
2323 } // namespace content 2331 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget_owner_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698