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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 OnGetSerializedHtmlWithLocalLinks) | 1567 OnGetSerializedHtmlWithLocalLinks) |
1568 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1568 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
1569 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1569 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
1570 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) | 1570 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) |
1571 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) | 1571 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) |
1572 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1572 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
1573 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, | 1573 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, |
1574 OnSuppressFurtherDialogs) | 1574 OnSuppressFurtherDialogs) |
1575 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) | 1575 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) |
1576 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) | 1576 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) |
| 1577 IPC_MESSAGE_HANDLER(FrameMsg_BlinkFeatureUsageReport, |
| 1578 OnBlinkFeatureUsageReport) |
| 1579 IPC_MESSAGE_HANDLER(FrameMsg_MixedContentFound, OnMixedContentFound) |
1577 #if defined(OS_ANDROID) | 1580 #if defined(OS_ANDROID) |
1578 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, | 1581 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, |
1579 OnActivateNearestFindResult) | 1582 OnActivateNearestFindResult) |
1580 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, | 1583 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, |
1581 OnGetNearestFindResult) | 1584 OnGetNearestFindResult) |
1582 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) | 1585 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) |
1583 #endif | 1586 #endif |
1584 | 1587 |
1585 #if defined(USE_EXTERNAL_POPUP_MENU) | 1588 #if defined(USE_EXTERNAL_POPUP_MENU) |
1586 #if defined(OS_MACOSX) | 1589 #if defined(OS_MACOSX) |
(...skipping 4130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5717 } | 5720 } |
5718 } | 5721 } |
5719 | 5722 |
5720 void RenderFrameImpl::OnClearFocusedElement() { | 5723 void RenderFrameImpl::OnClearFocusedElement() { |
5721 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid | 5724 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid |
5722 // calling this on the WebView? | 5725 // calling this on the WebView? |
5723 if (auto* webview = render_view_->GetWebView()) | 5726 if (auto* webview = render_view_->GetWebView()) |
5724 webview->clearFocusedElement(); | 5727 webview->clearFocusedElement(); |
5725 } | 5728 } |
5726 | 5729 |
| 5730 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { |
| 5731 frame_->blinkFeatureUsageReport(features); |
| 5732 } |
| 5733 |
| 5734 void RenderFrameImpl::OnMixedContentFound( |
| 5735 const GURL& main_resource_url, |
| 5736 const GURL& mixed_content_url, |
| 5737 RequestContextType request_context_type, |
| 5738 bool was_allowed, |
| 5739 bool had_redirect) { |
| 5740 auto request_context = |
| 5741 static_cast<blink::WebURLRequest::RequestContext>(request_context_type); |
| 5742 frame_->mixedContentFound(main_resource_url, mixed_content_url, |
| 5743 request_context, was_allowed, had_redirect); |
| 5744 } |
| 5745 |
5727 #if defined(OS_ANDROID) | 5746 #if defined(OS_ANDROID) |
5728 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, | 5747 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, |
5729 float x, | 5748 float x, |
5730 float y) { | 5749 float y) { |
5731 WebRect selection_rect; | 5750 WebRect selection_rect; |
5732 int ordinal = | 5751 int ordinal = |
5733 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); | 5752 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); |
5734 if (ordinal == -1) { | 5753 if (ordinal == -1) { |
5735 // Something went wrong, so send a no-op reply (force the frame to report | 5754 // Something went wrong, so send a no-op reply (force the frame to report |
5736 // the current match count) in case the host is waiting for a response due | 5755 // the current match count) in case the host is waiting for a response due |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6879 // event target. Potentially a Pepper plugin will receive the event. | 6898 // event target. Potentially a Pepper plugin will receive the event. |
6880 // In order to tell whether a plugin gets the last mouse event and which it | 6899 // In order to tell whether a plugin gets the last mouse event and which it |
6881 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6900 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6882 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6901 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6883 // |pepper_last_mouse_event_target_|. | 6902 // |pepper_last_mouse_event_target_|. |
6884 pepper_last_mouse_event_target_ = nullptr; | 6903 pepper_last_mouse_event_target_ = nullptr; |
6885 #endif | 6904 #endif |
6886 } | 6905 } |
6887 | 6906 |
6888 } // namespace content | 6907 } // namespace content |
OLD | NEW |