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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 } | 1536 } |
1537 | 1537 |
1538 bool handled = true; | 1538 bool handled = true; |
1539 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) | 1539 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) |
1540 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) | 1540 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) |
1541 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) | 1541 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) |
1542 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) | 1542 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) |
1543 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) | 1543 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) |
1544 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) | 1544 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) |
1545 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) | 1545 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) |
| 1546 IPC_MESSAGE_HANDLER(FrameMsg_Collapse, OnCollapse) |
1546 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) | 1547 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) |
1547 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, | 1548 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, |
1548 OnCustomContextMenuAction) | 1549 OnCustomContextMenuAction) |
1549 #if BUILDFLAG(ENABLE_PLUGINS) | 1550 #if BUILDFLAG(ENABLE_PLUGINS) |
1550 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) | 1551 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) |
1551 #endif | 1552 #endif |
1552 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) | 1553 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) |
1553 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) | 1554 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) |
1554 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) | 1555 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) |
1555 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) | 1556 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) |
(...skipping 3290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4846 // detached/deleted. If that happens, return immediately. | 4847 // detached/deleted. If that happens, return immediately. |
4847 base::WeakPtr<RenderFrameImpl> weak_this = weak_factory_.GetWeakPtr(); | 4848 base::WeakPtr<RenderFrameImpl> weak_this = weak_factory_.GetWeakPtr(); |
4848 frame_->StopLoading(); | 4849 frame_->StopLoading(); |
4849 if (!weak_this) | 4850 if (!weak_this) |
4850 return; | 4851 return; |
4851 | 4852 |
4852 for (auto& observer : observers_) | 4853 for (auto& observer : observers_) |
4853 observer.OnStop(); | 4854 observer.OnStop(); |
4854 } | 4855 } |
4855 | 4856 |
| 4857 void RenderFrameImpl::OnCollapse(bool collapsed) { |
| 4858 frame_->Collapse(collapsed); |
| 4859 } |
| 4860 |
4856 void RenderFrameImpl::WasHidden() { | 4861 void RenderFrameImpl::WasHidden() { |
4857 for (auto& observer : observers_) | 4862 for (auto& observer : observers_) |
4858 observer.WasHidden(); | 4863 observer.WasHidden(); |
4859 | 4864 |
4860 #if BUILDFLAG(ENABLE_PLUGINS) | 4865 #if BUILDFLAG(ENABLE_PLUGINS) |
4861 for (auto* plugin : active_pepper_instances_) | 4866 for (auto* plugin : active_pepper_instances_) |
4862 plugin->PageVisibilityChanged(false); | 4867 plugin->PageVisibilityChanged(false); |
4863 #endif // ENABLE_PLUGINS | 4868 #endif // ENABLE_PLUGINS |
4864 | 4869 |
4865 if (GetWebFrame()->FrameWidget()) { | 4870 if (GetWebFrame()->FrameWidget()) { |
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7063 policy(info.default_policy), | 7068 policy(info.default_policy), |
7064 replaces_current_history_item(info.replaces_current_history_item), | 7069 replaces_current_history_item(info.replaces_current_history_item), |
7065 history_navigation_in_new_child_frame( | 7070 history_navigation_in_new_child_frame( |
7066 info.is_history_navigation_in_new_child_frame), | 7071 info.is_history_navigation_in_new_child_frame), |
7067 client_redirect(info.is_client_redirect), | 7072 client_redirect(info.is_client_redirect), |
7068 cache_disabled(info.is_cache_disabled), | 7073 cache_disabled(info.is_cache_disabled), |
7069 form(info.form), | 7074 form(info.form), |
7070 source_location(info.source_location) {} | 7075 source_location(info.source_location) {} |
7071 | 7076 |
7072 } // namespace content | 7077 } // namespace content |
OLD | NEW |