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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 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 "chrome/renderer/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 void ChromeRenderViewObserver::DidCommitProvisionalLoad( 162 void ChromeRenderViewObserver::DidCommitProvisionalLoad(
163 blink::WebLocalFrame* frame, 163 blink::WebLocalFrame* frame,
164 bool is_new_navigation) { 164 bool is_new_navigation) {
165 if ((render_view()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) && 165 if ((render_view()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) &&
166 !webui_javascript_.empty()) { 166 !webui_javascript_.empty()) {
167 for (const auto& script : webui_javascript_) 167 for (const auto& script : webui_javascript_)
168 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script); 168 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script);
169 webui_javascript_.clear(); 169 webui_javascript_.clear();
170 } 170 }
171 } 171 }
172
173 void ChromeRenderViewObserver::OnDestruct() {
174 delete this;
175 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.h ('k') | chrome/renderer/content_settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698