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

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

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 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
===================================================================
--- content/browser/webui/web_ui.cc (revision 116011)
+++ content/browser/webui/web_ui.cc (working copy)
@@ -21,6 +21,8 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_message_macros.h"
+using content::WebContents;
+
// static
string16 WebUI::GetJavascriptCall(
const std::string& function_name,
@@ -38,14 +40,14 @@
char16('(') + parameters + char16(')') + char16(';');
}
-WebUI::WebUI(TabContents* contents)
+WebUI::WebUI(WebContents* contents)
: hide_favicon_(false),
focus_location_bar_by_default_(false),
should_hide_url_(false),
link_transition_type_(content::PAGE_TRANSITION_LINK),
bindings_(content::BINDINGS_POLICY_WEB_UI),
register_callback_overwrites_(false),
- tab_contents_(contents) {
+ web_contents_(contents) {
DCHECK(contents);
AddMessageHandler(new GenericHandler());
}
@@ -71,7 +73,7 @@
const std::string& message,
const ListValue& args) {
if (!ChildProcessSecurityPolicy::GetInstance()->
- HasWebUIBindings(tab_contents_->GetRenderProcessHost()->GetID())) {
+ HasWebUIBindings(web_contents_->GetRenderProcessHost()->GetID())) {
NOTREACHED() << "Blocked unauthorized use of WebUIBindings.";
return;
}
@@ -174,7 +176,7 @@
}
void WebUI::ExecuteJavascript(const string16& javascript) {
- tab_contents_->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
+ web_contents_->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
ASCIIToUTF16(frame_xpath_), 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