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

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

Issue 2632633006: Implement NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE. (Closed)
Patch Set: Moar tests. Created 3 years, 11 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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 } 1490 }
1491 1491
1492 bool handled = true; 1492 bool handled = true;
1493 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg) 1493 IPC_BEGIN_MESSAGE_MAP(RenderFrameImpl, msg)
1494 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate) 1494 IPC_MESSAGE_HANDLER(FrameMsg_Navigate, OnNavigate)
1495 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload) 1495 IPC_MESSAGE_HANDLER(FrameMsg_BeforeUnload, OnBeforeUnload)
1496 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) 1496 IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut)
1497 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn) 1497 IPC_MESSAGE_HANDLER(FrameMsg_SwapIn, OnSwapIn)
1498 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame) 1498 IPC_MESSAGE_HANDLER(FrameMsg_Delete, OnDeleteFrame)
1499 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop) 1499 IPC_MESSAGE_HANDLER(FrameMsg_Stop, OnStop)
1500 IPC_MESSAGE_HANDLER(FrameMsg_CollapseFrameOwner, OnCollapseFrameOwner)
1500 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed) 1501 IPC_MESSAGE_HANDLER(FrameMsg_ContextMenuClosed, OnContextMenuClosed)
1501 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction, 1502 IPC_MESSAGE_HANDLER(FrameMsg_CustomContextMenuAction,
1502 OnCustomContextMenuAction) 1503 OnCustomContextMenuAction)
1503 #if BUILDFLAG(ENABLE_PLUGINS) 1504 #if BUILDFLAG(ENABLE_PLUGINS)
1504 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume) 1505 IPC_MESSAGE_HANDLER(FrameMsg_SetPepperVolume, OnSetPepperVolume)
1505 #endif 1506 #endif
1506 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo) 1507 IPC_MESSAGE_HANDLER(InputMsg_Undo, OnUndo)
1507 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo) 1508 IPC_MESSAGE_HANDLER(InputMsg_Redo, OnRedo)
1508 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut) 1509 IPC_MESSAGE_HANDLER(InputMsg_Cut, OnCut)
1509 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy) 1510 IPC_MESSAGE_HANDLER(InputMsg_Copy, OnCopy)
(...skipping 3238 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 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after
6874 // event target. Potentially a Pepper plugin will receive the event. 6879 // event target. Potentially a Pepper plugin will receive the event.
6875 // In order to tell whether a plugin gets the last mouse event and which it 6880 // In order to tell whether a plugin gets the last mouse event and which it
6876 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6881 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6877 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6882 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6878 // |pepper_last_mouse_event_target_|. 6883 // |pepper_last_mouse_event_target_|.
6879 pepper_last_mouse_event_target_ = nullptr; 6884 pepper_last_mouse_event_target_ = nullptr;
6880 #endif 6885 #endif
6881 } 6886 }
6882 6887
6883 } // namespace content 6888 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698