Chromium Code Reviews| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 if (deemphasized) { | 152 if (deemphasized) { |
| 153 // 70% opaque grey. | 153 // 70% opaque grey. |
| 154 SkColor greyish = SkColorSetARGB(178, 0, 0, 0); | 154 SkColor greyish = SkColorSetARGB(178, 0, 0, 0); |
| 155 render_view()->GetWebView()->setPageOverlayColor(greyish); | 155 render_view()->GetWebView()->setPageOverlayColor(greyish); |
| 156 } else { | 156 } else { |
| 157 render_view()->GetWebView()->setPageOverlayColor(SK_ColorTRANSPARENT); | 157 render_view()->GetWebView()->setPageOverlayColor(SK_ColorTRANSPARENT); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 void ChromeRenderViewObserver::DidStartLoading() { | 162 void ChromeRenderViewObserver::DidCommitProvisionalLoad( |
|
dcheng
2016/02/26 22:52:29
Blink no longer always blindly reuses a Window obj
| |
| 163 blink::WebLocalFrame* frame, | |
| 164 bool is_new_navigation) { | |
| 163 if ((render_view()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) && | 165 if ((render_view()->GetEnabledBindings() & content::BINDINGS_POLICY_WEB_UI) && |
| 164 !webui_javascript_.empty()) { | 166 !webui_javascript_.empty()) { |
| 165 for (size_t i = 0; i < webui_javascript_.size(); ++i) { | 167 for (const auto& script : webui_javascript_) |
| 166 render_view()->GetMainRenderFrame()->ExecuteJavaScript( | 168 render_view()->GetMainRenderFrame()->ExecuteJavaScript(script); |
| 167 webui_javascript_[i]); | |
| 168 } | |
| 169 webui_javascript_.clear(); | 169 webui_javascript_.clear(); |
| 170 } | 170 } |
| 171 } | 171 } |
| OLD | NEW |