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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.cc

Issue 2418143004: Reduce FOR_EACH_OBSERVER usage in content/browser/renderer_host (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_widget_host_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 : nullptr; 73 : nullptr;
74 } 74 }
75 75
76 RenderWidgetHost* RenderWidgetHostViewBase::GetRenderWidgetHost() const { 76 RenderWidgetHost* RenderWidgetHostViewBase::GetRenderWidgetHost() const {
77 return nullptr; 77 return nullptr;
78 } 78 }
79 79
80 void RenderWidgetHostViewBase::NotifyObserversAboutShutdown() { 80 void RenderWidgetHostViewBase::NotifyObserversAboutShutdown() {
81 // Note: RenderWidgetHostInputEventRouter is an observer, and uses the 81 // Note: RenderWidgetHostInputEventRouter is an observer, and uses the
82 // following notification to remove this view from its surface owners map. 82 // following notification to remove this view from its surface owners map.
83 FOR_EACH_OBSERVER(RenderWidgetHostViewBaseObserver, 83 for (auto& observer : observers_)
84 observers_, 84 observer.OnRenderWidgetHostViewBaseDestroyed(this);
85 OnRenderWidgetHostViewBaseDestroyed(this));
86 // All observers are required to disconnect after they are notified. 85 // All observers are required to disconnect after they are notified.
87 DCHECK(!observers_.might_have_observers()); 86 DCHECK(!observers_.might_have_observers());
88 } 87 }
89 88
90 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){ 89 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){
91 return false; 90 return false;
92 } 91 }
93 92
94 void RenderWidgetHostViewBase::SetBackgroundColor(SkColor color) { 93 void RenderWidgetHostViewBase::SetBackgroundColor(SkColor color) {
95 background_color_ = color; 94 background_color_ = color;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 522
524 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { 523 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const {
525 return false; 524 return false;
526 } 525 }
527 526
528 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { 527 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const {
529 return cc::SurfaceId(); 528 return cc::SurfaceId();
530 } 529 }
531 530
532 } // namespace content 531 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/browser/renderer_host/text_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698