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

Side by Side Diff: content/browser/webui/web_ui_impl.cc

Issue 1352813006: Move WebUI ownership from the RenderFrameHostManager to the RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More test fixes and improvements but the code is stil a WIP! Created 5 years, 3 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 "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
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
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
OLDNEW
« content/browser/web_contents/web_contents_impl.cc ('K') | « content/browser/webui/web_ui_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698