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

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

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ALL THE TESTS. Hopefully. Created 4 years, 10 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698