| OLD | NEW |
| 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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1564 OnGetSavableResourceLinks) | 1564 OnGetSavableResourceLinks) |
| 1565 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, | 1565 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
| 1566 OnGetSerializedHtmlWithLocalLinks) | 1566 OnGetSerializedHtmlWithLocalLinks) |
| 1567 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1567 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
| 1568 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1568 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
| 1569 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) | 1569 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) |
| 1570 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) | 1570 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) |
| 1571 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1571 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
| 1572 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, | 1572 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, |
| 1573 OnSuppressFurtherDialogs) | 1573 OnSuppressFurtherDialogs) |
| 1574 IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, | |
| 1575 OnSetHasReceivedUserGesture) | |
| 1576 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) | 1574 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) |
| 1577 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) | 1575 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) |
| 1578 #if defined(OS_ANDROID) | 1576 #if defined(OS_ANDROID) |
| 1579 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, | 1577 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, |
| 1580 OnActivateNearestFindResult) | 1578 OnActivateNearestFindResult) |
| 1581 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, | 1579 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, |
| 1582 OnGetNearestFindResult) | 1580 OnGetNearestFindResult) |
| 1583 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) | 1581 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) |
| 1584 #endif | 1582 #endif |
| 1585 | 1583 |
| (...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3217 void RenderFrameImpl::didMatchCSS( | 3215 void RenderFrameImpl::didMatchCSS( |
| 3218 blink::WebLocalFrame* frame, | 3216 blink::WebLocalFrame* frame, |
| 3219 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 3217 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
| 3220 const blink::WebVector<blink::WebString>& stopped_matching_selectors) { | 3218 const blink::WebVector<blink::WebString>& stopped_matching_selectors) { |
| 3221 DCHECK_EQ(frame_, frame); | 3219 DCHECK_EQ(frame_, frame); |
| 3222 | 3220 |
| 3223 for (auto& observer : observers_) | 3221 for (auto& observer : observers_) |
| 3224 observer.DidMatchCSS(newly_matching_selectors, stopped_matching_selectors); | 3222 observer.DidMatchCSS(newly_matching_selectors, stopped_matching_selectors); |
| 3225 } | 3223 } |
| 3226 | 3224 |
| 3225 void RenderFrameImpl::setHasReceivedUserGesture() { |
| 3226 Send(new FrameHostMsg_SetHasReceivedUserGesture(routing_id_)); |
| 3227 } |
| 3228 |
| 3227 bool RenderFrameImpl::shouldReportDetailedMessageForSource( | 3229 bool RenderFrameImpl::shouldReportDetailedMessageForSource( |
| 3228 const blink::WebString& source) { | 3230 const blink::WebString& source) { |
| 3229 return GetContentClient()->renderer()->ShouldReportDetailedMessageForSource( | 3231 return GetContentClient()->renderer()->ShouldReportDetailedMessageForSource( |
| 3230 source); | 3232 source); |
| 3231 } | 3233 } |
| 3232 | 3234 |
| 3233 void RenderFrameImpl::didAddMessageToConsole( | 3235 void RenderFrameImpl::didAddMessageToConsole( |
| 3234 const blink::WebConsoleMessage& message, | 3236 const blink::WebConsoleMessage& message, |
| 3235 const blink::WebString& source_name, | 3237 const blink::WebString& source_name, |
| 3236 unsigned source_line, | 3238 unsigned source_line, |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5667 void RenderFrameImpl::OnEnableViewSourceMode() { | 5669 void RenderFrameImpl::OnEnableViewSourceMode() { |
| 5668 DCHECK(frame_); | 5670 DCHECK(frame_); |
| 5669 DCHECK(!frame_->parent()); | 5671 DCHECK(!frame_->parent()); |
| 5670 frame_->enableViewSourceMode(true); | 5672 frame_->enableViewSourceMode(true); |
| 5671 } | 5673 } |
| 5672 | 5674 |
| 5673 void RenderFrameImpl::OnSuppressFurtherDialogs() { | 5675 void RenderFrameImpl::OnSuppressFurtherDialogs() { |
| 5674 suppress_further_dialogs_ = true; | 5676 suppress_further_dialogs_ = true; |
| 5675 } | 5677 } |
| 5676 | 5678 |
| 5677 void RenderFrameImpl::OnSetHasReceivedUserGesture() { | |
| 5678 DCHECK(frame_); | |
| 5679 frame_->setHasReceivedUserGesture(); | |
| 5680 } | |
| 5681 | |
| 5682 void RenderFrameImpl::OnFileChooserResponse( | 5679 void RenderFrameImpl::OnFileChooserResponse( |
| 5683 const std::vector<content::FileChooserFileInfo>& files) { | 5680 const std::vector<content::FileChooserFileInfo>& files) { |
| 5684 // This could happen if we navigated to a different page before the user | 5681 // This could happen if we navigated to a different page before the user |
| 5685 // closed the chooser. | 5682 // closed the chooser. |
| 5686 if (file_chooser_completions_.empty()) | 5683 if (file_chooser_completions_.empty()) |
| 5687 return; | 5684 return; |
| 5688 | 5685 |
| 5689 // Convert Chrome's SelectedFileInfo list to WebKit's. | 5686 // Convert Chrome's SelectedFileInfo list to WebKit's. |
| 5690 WebVector<blink::WebFileChooserCompletion::SelectedFileInfo> selected_files( | 5687 WebVector<blink::WebFileChooserCompletion::SelectedFileInfo> selected_files( |
| 5691 files.size()); | 5688 files.size()); |
| (...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6866 // event target. Potentially a Pepper plugin will receive the event. | 6863 // event target. Potentially a Pepper plugin will receive the event. |
| 6867 // In order to tell whether a plugin gets the last mouse event and which it | 6864 // In order to tell whether a plugin gets the last mouse event and which it |
| 6868 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6865 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6869 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6866 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6870 // |pepper_last_mouse_event_target_|. | 6867 // |pepper_last_mouse_event_target_|. |
| 6871 pepper_last_mouse_event_target_ = nullptr; | 6868 pepper_last_mouse_event_target_ = nullptr; |
| 6872 #endif | 6869 #endif |
| 6873 } | 6870 } |
| 6874 | 6871 |
| 6875 } // namespace content | 6872 } // namespace content |
| OLD | NEW |