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

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

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Added test Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "content/common/view_messages.h" 68 #include "content/common/view_messages.h"
69 #include "content/public/common/associated_interface_provider.h" 69 #include "content/public/common/associated_interface_provider.h"
70 #include "content/public/common/bindings_policy.h" 70 #include "content/public/common/bindings_policy.h"
71 #include "content/public/common/browser_side_navigation_policy.h" 71 #include "content/public/common/browser_side_navigation_policy.h"
72 #include "content/public/common/content_constants.h" 72 #include "content/public/common/content_constants.h"
73 #include "content/public/common/content_features.h" 73 #include "content/public/common/content_features.h"
74 #include "content/public/common/content_switches.h" 74 #include "content/public/common/content_switches.h"
75 #include "content/public/common/context_menu_params.h" 75 #include "content/public/common/context_menu_params.h"
76 #include "content/public/common/file_chooser_file_info.h" 76 #include "content/public/common/file_chooser_file_info.h"
77 #include "content/public/common/file_chooser_params.h" 77 #include "content/public/common/file_chooser_params.h"
78 #include "content/public/common/form_field_data.h"
78 #include "content/public/common/isolated_world_ids.h" 79 #include "content/public/common/isolated_world_ids.h"
79 #include "content/public/common/page_state.h" 80 #include "content/public/common/page_state.h"
80 #include "content/public/common/resource_response.h" 81 #include "content/public/common/resource_response.h"
81 #include "content/public/common/service_manager_connection.h" 82 #include "content/public/common/service_manager_connection.h"
82 #include "content/public/common/service_names.h" 83 #include "content/public/common/service_names.h"
83 #include "content/public/common/url_constants.h" 84 #include "content/public/common/url_constants.h"
84 #include "content/public/common/url_utils.h" 85 #include "content/public/common/url_utils.h"
85 #include "content/public/renderer/browser_plugin_delegate.h" 86 #include "content/public/renderer/browser_plugin_delegate.h"
86 #include "content/public/renderer/content_renderer_client.h" 87 #include "content/public/renderer/content_renderer_client.h"
87 #include "content/public/renderer/context_menu_client.h" 88 #include "content/public/renderer/context_menu_client.h"
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests, 1572 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestForTests,
1572 OnJavaScriptExecuteRequestForTests) 1573 OnJavaScriptExecuteRequestForTests)
1573 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld, 1574 IPC_MESSAGE_HANDLER(FrameMsg_JavaScriptExecuteRequestInIsolatedWorld,
1574 OnJavaScriptExecuteRequestInIsolatedWorld) 1575 OnJavaScriptExecuteRequestInIsolatedWorld)
1575 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest, 1576 IPC_MESSAGE_HANDLER(FrameMsg_VisualStateRequest,
1576 OnVisualStateRequest) 1577 OnVisualStateRequest)
1577 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) 1578 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
1578 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages) 1579 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages)
1579 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, 1580 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest,
1580 OnTextSurroundingSelectionRequest) 1581 OnTextSurroundingSelectionRequest)
1582 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest,
1583 OnFocusedFormFieldDataRequest)
1581 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 1584 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
1582 OnSetAccessibilityMode) 1585 OnSetAccessibilityMode)
1583 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1586 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1584 OnSnapshotAccessibilityTree) 1587 OnSnapshotAccessibilityTree)
1585 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1588 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1586 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1589 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1587 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1590 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1588 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1591 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1589 OnSetFrameOwnerProperties) 1592 OnSetFrameOwnerProperties)
1590 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) 1593 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 return; 2304 return;
2302 } 2305 }
2303 2306
2304 Send(new FrameHostMsg_TextSurroundingSelectionResponse( 2307 Send(new FrameHostMsg_TextSurroundingSelectionResponse(
2305 routing_id_, 2308 routing_id_,
2306 surroundingText.textContent(), 2309 surroundingText.textContent(),
2307 surroundingText.startOffsetInTextContent(), 2310 surroundingText.startOffsetInTextContent(),
2308 surroundingText.endOffsetInTextContent())); 2311 surroundingText.endOffsetInTextContent()));
2309 } 2312 }
2310 2313
2314 void RenderFrameImpl::OnFocusedFormFieldDataRequest(int request_id) {
2315 DCHECK(frame_);
2316 if (frame_ != render_view_->GetWebView()->focusedFrame())
2317 return;
David Trainor- moved to gerrit 2016/11/11 18:44:38 We still have to respond to the request right?
Charlie Reis 2016/11/11 22:20:46 Yes, otherwise we'll have a leak in the browser fo
shaktisahu 2016/11/15 05:44:54 Done. Sending an empty message. The blimp engine w
2318
2319 WebElement element = frame_->document().focusedElement();
2320 if (element.isNull())
2321 return;
David Trainor- moved to gerrit 2016/11/11 18:44:38 Same here.
shaktisahu 2016/11/15 05:44:54 Done.
2322
2323 DCHECK(GetRenderWidget()->GetWebWidget());
2324 blink::WebTextInputInfo info =
2325 GetRenderWidget()->GetWebWidget()->textInputInfo();
2326 FormFieldData field;
2327 field.text = info.value.utf8();
2328 field.placeholder = element.getAttribute("placeholder").utf8();
2329 field.text_input_type = GetRenderWidget()->GetTextInputType();
2330
2331 Send(new FrameHostMsg_FocusedFormFieldDataResponse(routing_id_, request_id,
2332 field));
2333 }
2334
2311 bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type, 2335 bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type,
2312 const base::string16& message, 2336 const base::string16& message,
2313 const base::string16& default_value, 2337 const base::string16& default_value,
2314 const GURL& frame_url, 2338 const GURL& frame_url,
2315 base::string16* result) { 2339 base::string16* result) {
2316 // Don't allow further dialogs if we are waiting to swap out, since the 2340 // Don't allow further dialogs if we are waiting to swap out, since the
2317 // ScopedPageLoadDeferrer in our stack prevents it. 2341 // ScopedPageLoadDeferrer in our stack prevents it.
2318 if (suppress_further_dialogs_) 2342 if (suppress_further_dialogs_)
2319 return false; 2343 return false;
2320 2344
(...skipping 4263 matching lines...) Expand 10 before | Expand all | Expand 10 after
6584 // event target. Potentially a Pepper plugin will receive the event. 6608 // event target. Potentially a Pepper plugin will receive the event.
6585 // In order to tell whether a plugin gets the last mouse event and which it 6609 // In order to tell whether a plugin gets the last mouse event and which it
6586 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6610 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6587 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6611 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6588 // |pepper_last_mouse_event_target_|. 6612 // |pepper_last_mouse_event_target_|.
6589 pepper_last_mouse_event_target_ = nullptr; 6613 pepper_last_mouse_event_target_ = nullptr;
6590 #endif 6614 #endif
6591 } 6615 }
6592 6616
6593 } // namespace content 6617 } // namespace content
OLDNEW
« content/common/frame_messages.h ('K') | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698