| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |