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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 2544993002: Avoid enabling accessibility for WebContents that are never shown (Closed)
Patch Set: Get rid of 'extension' from content code Created 4 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/interstitial_page_impl.h" 5 #include "content/browser/frame_host/interstitial_page_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 ->DidChangeVisibleSecurityState(); 239 ->DidChangeVisibleSecurityState();
240 } 240 }
241 241
242 DCHECK(!render_view_host_); 242 DCHECK(!render_view_host_);
243 render_view_host_ = CreateRenderViewHost(); 243 render_view_host_ = CreateRenderViewHost();
244 CreateWebContentsView(); 244 CreateWebContentsView();
245 245
246 GURL data_url = GURL("data:text/html;charset=utf-8," + 246 GURL data_url = GURL("data:text/html;charset=utf-8," +
247 net::EscapePath(delegate_->GetHTMLContents())); 247 net::EscapePath(delegate_->GetHTMLContents()));
248 frame_tree_.root()->current_frame_host()->NavigateToInterstitialURL(data_url); 248 frame_tree_.root()->current_frame_host()->NavigateToInterstitialURL(data_url);
249 frame_tree_.root()->current_frame_host()->SetAccessibilityMode( 249 frame_tree_.root()->current_frame_host()->UpdateAccessibilityMode();
250 GetAccessibilityMode());
251 250
252 notification_registrar_.Add(this, NOTIFICATION_NAV_ENTRY_PENDING, 251 notification_registrar_.Add(this, NOTIFICATION_NAV_ENTRY_PENDING,
253 Source<NavigationController>(controller_)); 252 Source<NavigationController>(controller_));
254 } 253 }
255 254
256 void InterstitialPageImpl::Hide() { 255 void InterstitialPageImpl::Hide() {
257 // We may have already been hidden, and are just waiting to be deleted. 256 // We may have already been hidden, and are just waiting to be deleted.
258 // We can't check for enabled() here, because some callers have already 257 // We can't check for enabled() here, because some callers have already
259 // called Disable. 258 // called Disable.
260 if (!render_view_host_) 259 if (!render_view_host_)
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { 952 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
954 WebContentsImpl* web_contents_impl = 953 WebContentsImpl* web_contents_impl =
955 static_cast<WebContentsImpl*>(web_contents_); 954 static_cast<WebContentsImpl*>(web_contents_);
956 if (!web_contents_impl) 955 if (!web_contents_impl)
957 return; 956 return;
958 957
959 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); 958 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor);
960 } 959 }
961 960
962 } // namespace content 961 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/accessibility_ui.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698