| 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 "base/debug/dump_without_crashing.h" | 7 #include "base/debug/dump_without_crashing.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 HasWebUIBindings(web_contents_->GetRenderProcessHost()->GetID()) || | 76 HasWebUIBindings(web_contents_->GetRenderProcessHost()->GetID()) || |
| 77 !WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI( | 77 !WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI( |
| 78 web_contents_->GetBrowserContext(), source_url)) { | 78 web_contents_->GetBrowserContext(), source_url)) { |
| 79 NOTREACHED() << "Blocked unauthorized use of WebUIBindings."; | 79 NOTREACHED() << "Blocked unauthorized use of WebUIBindings."; |
| 80 return; | 80 return; |
| 81 } | 81 } |
| 82 | 82 |
| 83 ProcessWebUIMessage(source_url, message, args); | 83 ProcessWebUIMessage(source_url, message, args); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void WebUIImpl::RenderViewCreated(RenderViewHost* render_view_host) { | |
| 87 controller_->RenderViewCreated(render_view_host); | |
| 88 } | |
| 89 | |
| 90 WebContents* WebUIImpl::GetWebContents() const { | 86 WebContents* WebUIImpl::GetWebContents() const { |
| 91 return web_contents_; | 87 return web_contents_; |
| 92 } | 88 } |
| 93 | 89 |
| 94 float WebUIImpl::GetDeviceScaleFactor() const { | 90 float WebUIImpl::GetDeviceScaleFactor() const { |
| 95 return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView()); | 91 return GetScaleFactorForView(web_contents_->GetRenderWidgetHostView()); |
| 96 } | 92 } |
| 97 | 93 |
| 98 const base::string16& WebUIImpl::GetOverriddenTitle() const { | 94 const base::string16& WebUIImpl::GetOverriddenTitle() const { |
| 99 return overridden_title_; | 95 return overridden_title_; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 } | 246 } |
| 251 | 247 |
| 252 void WebUIImpl::AddToSetIfFrameNameMatches( | 248 void WebUIImpl::AddToSetIfFrameNameMatches( |
| 253 std::set<RenderFrameHost*>* frame_set, | 249 std::set<RenderFrameHost*>* frame_set, |
| 254 RenderFrameHost* host) { | 250 RenderFrameHost* host) { |
| 255 if (host->GetFrameName() == frame_name_) | 251 if (host->GetFrameName() == frame_name_) |
| 256 frame_set->insert(host); | 252 frame_set->insert(host); |
| 257 } | 253 } |
| 258 | 254 |
| 259 } // namespace content | 255 } // namespace content |
| OLD | NEW |