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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 return true; | 1493 return true; |
1494 } | 1494 } |
1495 | 1495 |
1496 bool handled = true; | 1496 bool handled = true; |
1497 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) | 1497 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) |
1498 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) | 1498 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) |
1499 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) | 1499 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) |
1500 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) | 1500 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) |
1501 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) | 1501 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) |
1502 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) | 1502 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) |
| 1503 IPC_MESSAGE_HANDLER(FrameMsg_CollapseFrameOwner, OnCollapseFrameOwner) |
1503 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) | 1504 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) |
1504 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, | 1505 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, |
1505 OnCustomContextMenuAction) | 1506 OnCustomContextMenuAction) |
1506 #if BUILDFLAG(ENABLE_PLUGINS) | 1507 #if BUILDFLAG(ENABLE_PLUGINS) |
1507 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) | 1508 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) |
1508 #endif | 1509 #endif |
1509 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) | 1510 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) |
1510 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) | 1511 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) |
1511 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) | 1512 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) |
1512 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) | 1513 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) |
(...skipping 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4781 | 4782 |
4782 if (frame_ && !frame_->parent()) { | 4783 if (frame_ && !frame_->parent()) { |
4783 for (auto& observer : render_view_->observers_) | 4784 for (auto& observer : render_view_->observers_) |
4784 observer.OnStop(); | 4785 observer.OnStop(); |
4785 } | 4786 } |
4786 | 4787 |
4787 for (auto& observer : observers_) | 4788 for (auto& observer : observers_) |
4788 observer.OnStop(); | 4789 observer.OnStop(); |
4789 } | 4790 } |
4790 | 4791 |
| 4792 void RenderFrameImpl::OnCollapseFrameOwner(bool collapse) { |
| 4793 frame_->collapseFrameOwner(collapse); |
| 4794 } |
| 4795 |
4791 void RenderFrameImpl::WasHidden() { | 4796 void RenderFrameImpl::WasHidden() { |
4792 for (auto& observer : observers_) | 4797 for (auto& observer : observers_) |
4793 observer.WasHidden(); | 4798 observer.WasHidden(); |
4794 | 4799 |
4795 #if BUILDFLAG(ENABLE_PLUGINS) | 4800 #if BUILDFLAG(ENABLE_PLUGINS) |
4796 for (auto* plugin : active_pepper_instances_) | 4801 for (auto* plugin : active_pepper_instances_) |
4797 plugin->PageVisibilityChanged(false); | 4802 plugin->PageVisibilityChanged(false); |
4798 #endif // ENABLE_PLUGINS | 4803 #endif // ENABLE_PLUGINS |
4799 | 4804 |
4800 if (GetWebFrame()->frameWidget()) { | 4805 if (GetWebFrame()->frameWidget()) { |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6863 // event target. Potentially a Pepper plugin will receive the event. | 6868 // event target. Potentially a Pepper plugin will receive the event. |
6864 // In order to tell whether a plugin gets the last mouse event and which it | 6869 // In order to tell whether a plugin gets the last mouse event and which it |
6865 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6870 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6866 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6871 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6867 // |pepper_last_mouse_event_target_|. | 6872 // |pepper_last_mouse_event_target_|. |
6868 pepper_last_mouse_event_target_ = nullptr; | 6873 pepper_last_mouse_event_target_ = nullptr; |
6869 #endif | 6874 #endif |
6870 } | 6875 } |
6871 | 6876 |
6872 } // namespace content | 6877 } // namespace content |
OLD | NEW |