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

Unified Diff: content/browser/frame_host/frame_tree_node.cc

Issue 2422923002: Reduce usage of FOR_EACH_OBSERVER macro in content/browser (Closed)
Patch Set: skip cases in 2418143004 and 2418373002 Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/notification_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index 9d6eac59956f040c18ba9478aa7efcc9d024b4c9..3f789ef905cca6578e1778ef5eea8944e8e3c3e8 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -121,7 +121,8 @@ FrameTreeNode::FrameTreeNode(FrameTree* frame_tree,
FrameTreeNode::~FrameTreeNode() {
std::vector<std::unique_ptr<FrameTreeNode>>().swap(children_);
frame_tree_->FrameRemoved(this);
- FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeDestroyed(this));
+ for (auto& observer : observers_)
+ observer.OnFrameTreeNodeDestroyed(this);
if (opener_)
opener_->RemoveObserver(opener_observer_.get());
@@ -465,7 +466,8 @@ bool FrameTreeNode::StopLoading() {
void FrameTreeNode::DidFocus() {
last_focus_time_ = base::TimeTicks::Now();
- FOR_EACH_OBSERVER(Observer, observers_, OnFrameTreeNodeFocused(this));
+ for (auto& observer : observers_)
+ observer.OnFrameTreeNodeFocused(this);
}
void FrameTreeNode::BeforeUnloadCanceled() {
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/notification_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698