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 "content/browser/webui/web_ui_impl.h" | 5 #include "content/browser/webui/web_ui_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/debug/dump_without_crashing.h" | 9 #include "base/debug/dump_without_crashing.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 bool was_main_frame) { | 93 bool was_main_frame) { |
| 94 if (was_main_frame) { | 94 if (was_main_frame) { |
| 95 GURL site_url = render_view_host->GetSiteInstance()->GetSiteURL(); | 95 GURL site_url = render_view_host->GetSiteInstance()->GetSiteURL(); |
| 96 GetContentClient()->browser()->LogWebUIUrl(site_url); | 96 GetContentClient()->browser()->LogWebUIUrl(site_url); |
| 97 } | 97 } |
| 98 | 98 |
| 99 for (WebUIMessageHandler* handler : handlers_) | 99 for (WebUIMessageHandler* handler : handlers_) |
| 100 handler->RenderViewReused(); | 100 handler->RenderViewReused(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void WebUIImpl::RenderFrameHostSwappingOut() { | |
| 104 for (WebUIMessageHandler* handler : handlers_) | |
| 105 handler->RenderFrameHostSwappingOut(); | |
|
Dan Beam
2016/06/06 23:41:46
why wouldn't we just call DisallowJavascript() dir
tommycli
2016/06/07 17:46:07
Done.
| |
| 106 } | |
| 107 | |
| 103 WebContents* WebUIImpl::GetWebContents() const { | 108 WebContents* WebUIImpl::GetWebContents() const { |
| 104 return web_contents_; | 109 return web_contents_; |
| 105 } | 110 } |
| 106 | 111 |
| 107 float WebUIImpl::GetDeviceScaleFactor() const { | 112 float WebUIImpl::GetDeviceScaleFactor() const { |
| 108 return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView()); | 113 return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView()); |
| 109 } | 114 } |
| 110 | 115 |
| 111 const base::string16& WebUIImpl::GetOverriddenTitle() const { | 116 const base::string16& WebUIImpl::GetOverriddenTitle() const { |
| 112 return overridden_title_; | 117 return overridden_title_; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 } | 274 } |
| 270 | 275 |
| 271 void WebUIImpl::AddToSetIfFrameNameMatches( | 276 void WebUIImpl::AddToSetIfFrameNameMatches( |
| 272 std::set<RenderFrameHost*>* frame_set, | 277 std::set<RenderFrameHost*>* frame_set, |
| 273 RenderFrameHost* host) { | 278 RenderFrameHost* host) { |
| 274 if (host->GetFrameName() == frame_name_) | 279 if (host->GetFrameName() == frame_name_) |
| 275 frame_set->insert(host); | 280 frame_set->insert(host); |
| 276 } | 281 } |
| 277 | 282 |
| 278 } // namespace content | 283 } // namespace content |
| OLD | NEW |