Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Rebase. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 } 1540 }
1541 1541
1542 bool handled = true; 1542 bool handled = true;
1543 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) 1543 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg)
1544 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) 1544 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate)
1545 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) 1545 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload)
1546 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) 1546 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut)
1547 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) 1547 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn)
1548 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) 1548 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame)
1549 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) 1549 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop)
1550 IPC_MESSAGE_HANDLER(FrameMsg_Collapse, OnCollapse)
1550 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) 1551 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed)
1551 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, 1552 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction,
1552 OnCustomContextMenuAction) 1553 OnCustomContextMenuAction)
1553 #if BUILDFLAG(ENABLE_PLUGINS) 1554 #if BUILDFLAG(ENABLE_PLUGINS)
1554 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) 1555 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume)
1555 #endif 1556 #endif
1556 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) 1557 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo)
1557 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) 1558 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo)
1558 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) 1559 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut)
1559 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) 1560 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy)
(...skipping 3325 matching lines...) Expand 10 before | Expand all | Expand 10 after
4885 4886
4886 if (frame_ && !frame_->Parent()) { 4887 if (frame_ && !frame_->Parent()) {
4887 for (auto& observer : render_view_->observers_) 4888 for (auto& observer : render_view_->observers_)
4888 observer.OnStop(); 4889 observer.OnStop();
4889 } 4890 }
4890 4891
4891 for (auto& observer : observers_) 4892 for (auto& observer : observers_)
4892 observer.OnStop(); 4893 observer.OnStop();
4893 } 4894 }
4894 4895
4896 void RenderFrameImpl::OnCollapse(bool collapsed) {
4897 frame_->Collapse(collapsed);
4898 }
4899
4895 void RenderFrameImpl::WasHidden() { 4900 void RenderFrameImpl::WasHidden() {
4896 for (auto& observer : observers_) 4901 for (auto& observer : observers_)
4897 observer.WasHidden(); 4902 observer.WasHidden();
4898 4903
4899 #if BUILDFLAG(ENABLE_PLUGINS) 4904 #if BUILDFLAG(ENABLE_PLUGINS)
4900 for (auto* plugin : active_pepper_instances_) 4905 for (auto* plugin : active_pepper_instances_)
4901 plugin->PageVisibilityChanged(false); 4906 plugin->PageVisibilityChanged(false);
4902 #endif // ENABLE_PLUGINS 4907 #endif // ENABLE_PLUGINS
4903 4908
4904 if (GetWebFrame()->FrameWidget()) { 4909 if (GetWebFrame()->FrameWidget()) {
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
7104 policy(info.default_policy), 7109 policy(info.default_policy),
7105 replaces_current_history_item(info.replaces_current_history_item), 7110 replaces_current_history_item(info.replaces_current_history_item),
7106 history_navigation_in_new_child_frame( 7111 history_navigation_in_new_child_frame(
7107 info.is_history_navigation_in_new_child_frame), 7112 info.is_history_navigation_in_new_child_frame),
7108 client_redirect(info.is_client_redirect), 7113 client_redirect(info.is_client_redirect),
7109 cache_disabled(info.is_cache_disabled), 7114 cache_disabled(info.is_cache_disabled),
7110 form(info.form), 7115 form(info.form),
7111 source_location(info.source_location) {} 7116 source_location(info.source_location) {}
7112 7117
7113 } // namespace content 7118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698