| 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 <set> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <utility> | 10 #include <utility> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "base/auto_reset.h" | 13 #include "base/auto_reset.h" |
| 13 #include "base/bind_helpers.h" | 14 #include "base/bind_helpers.h" |
| 14 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 15 #include "base/debug/alias.h" | 16 #include "base/debug/alias.h" |
| 16 #include "base/debug/asan_invalid_access.h" | 17 #include "base/debug/asan_invalid_access.h" |
| 17 #include "base/debug/crash_logging.h" | 18 #include "base/debug/crash_logging.h" |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1577 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
| 1577 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1578 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
| 1578 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) | 1579 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) |
| 1579 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) | 1580 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) |
| 1580 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1581 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
| 1581 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, | 1582 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, |
| 1582 OnSuppressFurtherDialogs) | 1583 OnSuppressFurtherDialogs) |
| 1583 IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, | 1584 IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, |
| 1584 OnSetHasReceivedUserGesture) | 1585 OnSetHasReceivedUserGesture) |
| 1585 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) | 1586 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) |
| 1587 IPC_MESSAGE_HANDLER(FrameMsg_MixedContentUpdate, OnMixedContentUpdate) |
| 1586 #if defined(OS_ANDROID) | 1588 #if defined(OS_ANDROID) |
| 1587 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, | 1589 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, |
| 1588 OnActivateNearestFindResult) | 1590 OnActivateNearestFindResult) |
| 1589 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, | 1591 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, |
| 1590 OnGetNearestFindResult) | 1592 OnGetNearestFindResult) |
| 1591 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) | 1593 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) |
| 1592 #endif | 1594 #endif |
| 1593 | 1595 |
| 1594 #if defined(USE_EXTERNAL_POPUP_MENU) | 1596 #if defined(USE_EXTERNAL_POPUP_MENU) |
| 1595 #if defined(OS_MACOSX) | 1597 #if defined(OS_MACOSX) |
| (...skipping 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5608 } | 5610 } |
| 5609 file_chooser_completions_.pop_front(); | 5611 file_chooser_completions_.pop_front(); |
| 5610 | 5612 |
| 5611 // If there are more pending file chooser requests, schedule one now. | 5613 // If there are more pending file chooser requests, schedule one now. |
| 5612 if (!file_chooser_completions_.empty()) { | 5614 if (!file_chooser_completions_.empty()) { |
| 5613 Send(new FrameHostMsg_RunFileChooser( | 5615 Send(new FrameHostMsg_RunFileChooser( |
| 5614 routing_id_, file_chooser_completions_.front()->params)); | 5616 routing_id_, file_chooser_completions_.front()->params)); |
| 5615 } | 5617 } |
| 5616 } | 5618 } |
| 5617 | 5619 |
| 5620 void RenderFrameImpl::OnMixedContentUpdate(const std::set<int>& features, |
| 5621 bool mixed_content_was_found, |
| 5622 const GURL& mixed_content_url, |
| 5623 bool mixed_content_had_redirect) { |
| 5624 frame_->mixedContentUpdateFromBrowser(features, mixed_content_was_found, |
| 5625 mixed_content_url, |
| 5626 mixed_content_had_redirect); |
| 5627 } |
| 5628 |
| 5618 #if defined(OS_ANDROID) | 5629 #if defined(OS_ANDROID) |
| 5619 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, | 5630 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, |
| 5620 float x, | 5631 float x, |
| 5621 float y) { | 5632 float y) { |
| 5622 WebRect selection_rect; | 5633 WebRect selection_rect; |
| 5623 int ordinal = | 5634 int ordinal = |
| 5624 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); | 5635 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); |
| 5625 if (ordinal == -1) { | 5636 if (ordinal == -1) { |
| 5626 // Something went wrong, so send a no-op reply (force the frame to report | 5637 // Something went wrong, so send a no-op reply (force the frame to report |
| 5627 // the current match count) in case the host is waiting for a response due | 5638 // the current match count) in case the host is waiting for a response due |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6727 // event target. Potentially a Pepper plugin will receive the event. | 6738 // event target. Potentially a Pepper plugin will receive the event. |
| 6728 // In order to tell whether a plugin gets the last mouse event and which it | 6739 // In order to tell whether a plugin gets the last mouse event and which it |
| 6729 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6740 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6730 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6741 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6731 // |pepper_last_mouse_event_target_|. | 6742 // |pepper_last_mouse_event_target_|. |
| 6732 pepper_last_mouse_event_target_ = nullptr; | 6743 pepper_last_mouse_event_target_ = nullptr; |
| 6733 #endif | 6744 #endif |
| 6734 } | 6745 } |
| 6735 | 6746 |
| 6736 } // namespace content | 6747 } // namespace content |
| OLD | NEW |