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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1571 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1571 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
1572 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) | 1572 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) |
1573 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) | 1573 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) |
1574 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1574 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
1575 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, | 1575 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, |
1576 OnSuppressFurtherDialogs) | 1576 OnSuppressFurtherDialogs) |
1577 IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, | 1577 IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, |
1578 OnSetHasReceivedUserGesture) | 1578 OnSetHasReceivedUserGesture) |
1579 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) | 1579 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) |
1580 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) | 1580 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) |
1581 IPC_MESSAGE_HANDLER(FrameMsg_BlinkFeatureUsageReport, | |
1582 OnBlinkFeatureUsageReport) | |
1583 IPC_MESSAGE_HANDLER(FrameMsg_MixedContentFound, | |
1584 OnMixedContentFoundByTheBrowser) | |
nasko
2017/01/12 18:32:38
Also on the naming, we usually just prefix the IPC
carlosk
2017/01/21 02:54:59
Acknowledged.
| |
1581 #if defined(OS_ANDROID) | 1585 #if defined(OS_ANDROID) |
1582 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, | 1586 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, |
1583 OnActivateNearestFindResult) | 1587 OnActivateNearestFindResult) |
1584 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, | 1588 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, |
1585 OnGetNearestFindResult) | 1589 OnGetNearestFindResult) |
1586 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) | 1590 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) |
1587 #endif | 1591 #endif |
1588 | 1592 |
1589 #if defined(USE_EXTERNAL_POPUP_MENU) | 1593 #if defined(USE_EXTERNAL_POPUP_MENU) |
1590 #if defined(OS_MACOSX) | 1594 #if defined(OS_MACOSX) |
(...skipping 4060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5651 } | 5655 } |
5652 } | 5656 } |
5653 | 5657 |
5654 void RenderFrameImpl::OnClearFocusedElement() { | 5658 void RenderFrameImpl::OnClearFocusedElement() { |
5655 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid | 5659 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid |
5656 // calling this on the WebView? | 5660 // calling this on the WebView? |
5657 if (auto* webview = render_view_->GetWebView()) | 5661 if (auto* webview = render_view_->GetWebView()) |
5658 webview->clearFocusedElement(); | 5662 webview->clearFocusedElement(); |
5659 } | 5663 } |
5660 | 5664 |
5665 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { | |
5666 frame_->blinkFeatureUsageReport(features); | |
5667 } | |
5668 | |
5669 void RenderFrameImpl::OnMixedContentFoundByTheBrowser( | |
5670 const GURL& main_resource_url, | |
5671 const GURL& mixed_content_url, | |
5672 RequestContextType request_context_type, | |
5673 bool was_allowed, | |
5674 bool had_redirect) { | |
5675 auto request_context = | |
5676 static_cast<blink::WebURLRequest::RequestContext>(request_context_type); | |
5677 frame_->mixedContentFoundByTheBrowser(main_resource_url, mixed_content_url, | |
5678 request_context, was_allowed, | |
5679 had_redirect); | |
5680 } | |
5681 | |
5661 #if defined(OS_ANDROID) | 5682 #if defined(OS_ANDROID) |
5662 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, | 5683 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, |
5663 float x, | 5684 float x, |
5664 float y) { | 5685 float y) { |
5665 WebRect selection_rect; | 5686 WebRect selection_rect; |
5666 int ordinal = | 5687 int ordinal = |
5667 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); | 5688 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); |
5668 if (ordinal == -1) { | 5689 if (ordinal == -1) { |
5669 // Something went wrong, so send a no-op reply (force the frame to report | 5690 // Something went wrong, so send a no-op reply (force the frame to report |
5670 // the current match count) in case the host is waiting for a response due | 5691 // the current match count) in case the host is waiting for a response due |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6801 // event target. Potentially a Pepper plugin will receive the event. | 6822 // event target. Potentially a Pepper plugin will receive the event. |
6802 // In order to tell whether a plugin gets the last mouse event and which it | 6823 // In order to tell whether a plugin gets the last mouse event and which it |
6803 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6824 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6804 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6825 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6805 // |pepper_last_mouse_event_target_|. | 6826 // |pepper_last_mouse_event_target_|. |
6806 pepper_last_mouse_event_target_ = nullptr; | 6827 pepper_last_mouse_event_target_ = nullptr; |
6807 #endif | 6828 #endif |
6808 } | 6829 } |
6809 | 6830 |
6810 } // namespace content | 6831 } // namespace content |
OLD | NEW |