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

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, 10 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 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 } 1484 }
1485 1485
1486 bool handled = true; 1486 bool handled = true;
1487 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) 1487 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg)
1488 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) 1488 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate)
1489 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) 1489 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload)
1490 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) 1490 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut)
1491 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) 1491 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn)
1492 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) 1492 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame)
1493 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) 1493 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop)
1494 IPC_MESSAGE_HANDLER(FrameMsg_CollapseFrameOwner, OnCollapseFrameOwner)
1494 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) 1495 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed)
1495 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, 1496 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction,
1496 OnCustomContextMenuAction) 1497 OnCustomContextMenuAction)
1497 #if BUILDFLAG(ENABLE_PLUGINS) 1498 #if BUILDFLAG(ENABLE_PLUGINS)
1498 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) 1499 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume)
1499 #endif 1500 #endif
1500 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) 1501 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo)
1501 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) 1502 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo)
1502 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) 1503 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut)
1503 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) 1504 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy)
(...skipping 3244 matching lines...) Expand 10 before | Expand all | Expand 10 after
4748 4749
4749 if (frame_ && !frame_->parent()) { 4750 if (frame_ && !frame_->parent()) {
4750 for (auto& observer : render_view_->observers_) 4751 for (auto& observer : render_view_->observers_)
4751 observer.OnStop(); 4752 observer.OnStop();
4752 } 4753 }
4753 4754
4754 for (auto& observer : observers_) 4755 for (auto& observer : observers_)
4755 observer.OnStop(); 4756 observer.OnStop();
4756 } 4757 }
4757 4758
4759 void RenderFrameImpl::OnCollapseFrameOwner(bool collapse) {
4760 frame_->collapseFrameOwner(collapse);
4761 }
4762
4758 void RenderFrameImpl::WasHidden() { 4763 void RenderFrameImpl::WasHidden() {
4759 for (auto& observer : observers_) 4764 for (auto& observer : observers_)
4760 observer.WasHidden(); 4765 observer.WasHidden();
4761 4766
4762 #if BUILDFLAG(ENABLE_PLUGINS) 4767 #if BUILDFLAG(ENABLE_PLUGINS)
4763 for (auto* plugin : active_pepper_instances_) 4768 for (auto* plugin : active_pepper_instances_)
4764 plugin->PageVisibilityChanged(false); 4769 plugin->PageVisibilityChanged(false);
4765 #endif // ENABLE_PLUGINS 4770 #endif // ENABLE_PLUGINS
4766 4771
4767 if (GetWebFrame()->frameWidget()) { 4772 if (GetWebFrame()->frameWidget()) {
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
6855 // event target. Potentially a Pepper plugin will receive the event. 6860 // event target. Potentially a Pepper plugin will receive the event.
6856 // In order to tell whether a plugin gets the last mouse event and which it 6861 // In order to tell whether a plugin gets the last mouse event and which it
6857 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6862 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6858 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6863 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6859 // |pepper_last_mouse_event_target_|. 6864 // |pepper_last_mouse_event_target_|.
6860 pepper_last_mouse_event_target_ = nullptr; 6865 pepper_last_mouse_event_target_ = nullptr;
6861 #endif 6866 #endif
6862 } 6867 }
6863 6868
6864 } // namespace content 6869 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698