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

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

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: ... and without breaking stuff. 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 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after
4789 4790
4790 if (frame_ && !frame_->Parent()) { 4791 if (frame_ && !frame_->Parent()) {
4791 for (auto& observer : render_view_->observers_) 4792 for (auto& observer : render_view_->observers_)
4792 observer.OnStop(); 4793 observer.OnStop();
4793 } 4794 }
4794 4795
4795 for (auto& observer : observers_) 4796 for (auto& observer : observers_)
4796 observer.OnStop(); 4797 observer.OnStop();
4797 } 4798 }
4798 4799
4800 void RenderFrameImpl::OnCollapse(bool collapsed) {
4801 frame_->Collapse(collapsed);
4802 }
4803
4799 void RenderFrameImpl::WasHidden() { 4804 void RenderFrameImpl::WasHidden() {
4800 for (auto& observer : observers_) 4805 for (auto& observer : observers_)
4801 observer.WasHidden(); 4806 observer.WasHidden();
4802 4807
4803 #if BUILDFLAG(ENABLE_PLUGINS) 4808 #if BUILDFLAG(ENABLE_PLUGINS)
4804 for (auto* plugin : active_pepper_instances_) 4809 for (auto* plugin : active_pepper_instances_)
4805 plugin->PageVisibilityChanged(false); 4810 plugin->PageVisibilityChanged(false);
4806 #endif // ENABLE_PLUGINS 4811 #endif // ENABLE_PLUGINS
4807 4812
4808 if (GetWebFrame()->FrameWidget()) { 4813 if (GetWebFrame()->FrameWidget()) {
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
6961 policy(info.default_policy), 6966 policy(info.default_policy),
6962 replaces_current_history_item(info.replaces_current_history_item), 6967 replaces_current_history_item(info.replaces_current_history_item),
6963 history_navigation_in_new_child_frame( 6968 history_navigation_in_new_child_frame(
6964 info.is_history_navigation_in_new_child_frame), 6969 info.is_history_navigation_in_new_child_frame),
6965 client_redirect(info.is_client_redirect), 6970 client_redirect(info.is_client_redirect),
6966 cache_disabled(info.is_cache_disabled), 6971 cache_disabled(info.is_cache_disabled),
6967 form(info.form), 6972 form(info.form),
6968 source_location(info.source_location) {} 6973 source_location(info.source_location) {}
6969 6974
6970 } // namespace content 6975 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698