| 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 bool handled = true; | 1481 bool handled = true; |
| 1482 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) | 1482 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) |
| 1483 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) | 1483 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) |
| 1484 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) | 1484 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) |
| 1485 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) | 1485 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) |
| 1486 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) | 1486 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) |
| 1487 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) | 1487 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) |
| 1488 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) | 1488 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) |
| 1489 IPC_MESSAGE_HANDLER(FrameMsg_Collapse, OnCollapse) |
| 1489 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) | 1490 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) |
| 1490 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, | 1491 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, |
| 1491 OnCustomContextMenuAction) | 1492 OnCustomContextMenuAction) |
| 1492 #if BUILDFLAG(ENABLE_PLUGINS) | 1493 #if BUILDFLAG(ENABLE_PLUGINS) |
| 1493 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) | 1494 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) |
| 1494 #endif | 1495 #endif |
| 1495 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) | 1496 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) |
| 1496 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) | 1497 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) |
| 1497 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) | 1498 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) |
| 1498 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) | 1499 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) |
| (...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4741 | 4742 |
| 4742 if (frame_ && !frame_->parent()) { | 4743 if (frame_ && !frame_->parent()) { |
| 4743 for (auto& observer : render_view_->observers_) | 4744 for (auto& observer : render_view_->observers_) |
| 4744 observer.OnStop(); | 4745 observer.OnStop(); |
| 4745 } | 4746 } |
| 4746 | 4747 |
| 4747 for (auto& observer : observers_) | 4748 for (auto& observer : observers_) |
| 4748 observer.OnStop(); | 4749 observer.OnStop(); |
| 4749 } | 4750 } |
| 4750 | 4751 |
| 4752 void RenderFrameImpl::OnCollapse(bool collapsed) { |
| 4753 frame_->collapse(collapsed); |
| 4754 } |
| 4755 |
| 4751 void RenderFrameImpl::WasHidden() { | 4756 void RenderFrameImpl::WasHidden() { |
| 4752 for (auto& observer : observers_) | 4757 for (auto& observer : observers_) |
| 4753 observer.WasHidden(); | 4758 observer.WasHidden(); |
| 4754 | 4759 |
| 4755 #if BUILDFLAG(ENABLE_PLUGINS) | 4760 #if BUILDFLAG(ENABLE_PLUGINS) |
| 4756 for (auto* plugin : active_pepper_instances_) | 4761 for (auto* plugin : active_pepper_instances_) |
| 4757 plugin->PageVisibilityChanged(false); | 4762 plugin->PageVisibilityChanged(false); |
| 4758 #endif // ENABLE_PLUGINS | 4763 #endif // ENABLE_PLUGINS |
| 4759 | 4764 |
| 4760 if (GetWebFrame()->frameWidget()) { | 4765 if (GetWebFrame()->frameWidget()) { |
| (...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6851 // event target. Potentially a Pepper plugin will receive the event. | 6856 // event target. Potentially a Pepper plugin will receive the event. |
| 6852 // In order to tell whether a plugin gets the last mouse event and which it | 6857 // In order to tell whether a plugin gets the last mouse event and which it |
| 6853 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6858 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6854 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6859 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6855 // |pepper_last_mouse_event_target_|. | 6860 // |pepper_last_mouse_event_target_|. |
| 6856 pepper_last_mouse_event_target_ = nullptr; | 6861 pepper_last_mouse_event_target_ = nullptr; |
| 6857 #endif | 6862 #endif |
| 6858 } | 6863 } |
| 6859 | 6864 |
| 6860 } // namespace content | 6865 } // namespace content |
| OLD | NEW |