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

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

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Addressed comments, made redirect response PlzNavigate-only. Created 3 years, 8 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 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 } 1515 }
1516 1516
1517 bool handled = true; 1517 bool handled = true;
1518 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) 1518 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg)
1519 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) 1519 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate)
1520 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) 1520 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload)
1521 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) 1521 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut)
1522 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) 1522 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn)
1523 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) 1523 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame)
1524 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) 1524 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop)
1525 IPC_MESSAGE_HANDLER(FrameMsg_Collapse, OnCollapse)
1525 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) 1526 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed)
1526 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, 1527 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction,
1527 OnCustomContextMenuAction) 1528 OnCustomContextMenuAction)
1528 #if BUILDFLAG(ENABLE_PLUGINS) 1529 #if BUILDFLAG(ENABLE_PLUGINS)
1529 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) 1530 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume)
1530 #endif 1531 #endif
1531 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) 1532 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo)
1532 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) 1533 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo)
1533 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) 1534 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut)
1534 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) 1535 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy)
(...skipping 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after
4803 4804
4804 if (frame_ && !frame_->Parent()) { 4805 if (frame_ && !frame_->Parent()) {
4805 for (auto& observer : render_view_->observers_) 4806 for (auto& observer : render_view_->observers_)
4806 observer.OnStop(); 4807 observer.OnStop();
4807 } 4808 }
4808 4809
4809 for (auto& observer : observers_) 4810 for (auto& observer : observers_)
4810 observer.OnStop(); 4811 observer.OnStop();
4811 } 4812 }
4812 4813
4814 void RenderFrameImpl::OnCollapse(bool collapsed) {
4815 frame_->Collapse(collapsed);
4816 }
4817
4813 void RenderFrameImpl::WasHidden() { 4818 void RenderFrameImpl::WasHidden() {
4814 for (auto& observer : observers_) 4819 for (auto& observer : observers_)
4815 observer.WasHidden(); 4820 observer.WasHidden();
4816 4821
4817 #if BUILDFLAG(ENABLE_PLUGINS) 4822 #if BUILDFLAG(ENABLE_PLUGINS)
4818 for (auto* plugin : active_pepper_instances_) 4823 for (auto* plugin : active_pepper_instances_)
4819 plugin->PageVisibilityChanged(false); 4824 plugin->PageVisibilityChanged(false);
4820 #endif // ENABLE_PLUGINS 4825 #endif // ENABLE_PLUGINS
4821 4826
4822 if (GetWebFrame()->FrameWidget()) { 4827 if (GetWebFrame()->FrameWidget()) {
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
6975 policy(info.default_policy), 6980 policy(info.default_policy),
6976 replaces_current_history_item(info.replaces_current_history_item), 6981 replaces_current_history_item(info.replaces_current_history_item),
6977 history_navigation_in_new_child_frame( 6982 history_navigation_in_new_child_frame(
6978 info.is_history_navigation_in_new_child_frame), 6983 info.is_history_navigation_in_new_child_frame),
6979 client_redirect(info.is_client_redirect), 6984 client_redirect(info.is_client_redirect),
6980 cache_disabled(info.is_cache_disabled), 6985 cache_disabled(info.is_cache_disabled),
6981 form(info.form), 6986 form(info.form),
6982 source_location(info.source_location) {} 6987 source_location(info.source_location) {}
6983 6988
6984 } // namespace content 6989 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698