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

Unified Diff: content/browser/webui/web_ui.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile helper function, rebase Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/web_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui.cc
diff --git a/content/browser/webui/web_ui.cc b/content/browser/webui/web_ui.cc
index f4a91ca71ff15081d7d59d8b1fc0c26c9f93d393..22b9fa185b32e64d786e8bc4689ec91929989aa4 100644
--- a/content/browser/webui/web_ui.cc
+++ b/content/browser/webui/web_ui.cc
@@ -10,7 +10,6 @@
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/profiles/profile.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -47,6 +46,7 @@ WebUI::WebUI(TabContents* contents)
bindings_(BindingsPolicy::WEB_UI),
register_callback_overwrites_(false),
tab_contents_(contents) {
+ DCHECK(contents);
GenericHandler* handler = new GenericHandler();
AddMessageHandler(handler->Attach(this));
}
@@ -156,16 +156,6 @@ void WebUI::RegisterMessageCallback(const std::string &message,
result.first->second = callback;
}
-Profile* WebUI::GetProfile() const {
- DCHECK(tab_contents());
- return Profile::FromBrowserContext(tab_contents()->browser_context());
-}
-
-RenderViewHost* WebUI::GetRenderViewHost() const {
- DCHECK(tab_contents());
- return tab_contents()->render_view_host();
-}
-
bool WebUI::IsLoading() const {
std::vector<WebUIMessageHandler*>::const_iterator iter;
for (iter = handlers_.begin(); iter != handlers_.end(); ++iter) {
@@ -182,8 +172,8 @@ void WebUI::AddMessageHandler(WebUIMessageHandler* handler) {
}
void WebUI::ExecuteJavascript(const string16& javascript) {
- GetRenderViewHost()->ExecuteJavascriptInWebFrame(string16(),
- javascript);
+ tab_contents_->render_view_host()->ExecuteJavascriptInWebFrame(string16(),
+ javascript);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « content/browser/webui/web_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698