diff options
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/debugger_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/debugger_ui.h | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/devtools_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/devtools_ui.h | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui.cc | 10 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui.h | 10 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_factory.cc | 24 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_factory.h | 4 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_unittest.cc | 8 | ||||
-rw-r--r-- | chrome/browser/dom_ui/downloads_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/downloads_ui.h | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/history_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/history_ui.h | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/html_dialog_ui.cc | 8 | ||||
-rw-r--r-- | chrome/browser/dom_ui/html_dialog_ui.h | 12 | ||||
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 12 | ||||
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.h | 2 |
17 files changed, 53 insertions, 53 deletions
diff --git a/chrome/browser/dom_ui/debugger_ui.cc b/chrome/browser/dom_ui/debugger_ui.cc index c8b4e74..c20286a 100644 --- a/chrome/browser/dom_ui/debugger_ui.cc +++ b/chrome/browser/dom_ui/debugger_ui.cc @@ -121,7 +121,7 @@ class DebuggerHandler : public DOMMessageHandler { } // namespace -DebuggerUI::DebuggerUI(WebContents* contents) : DOMUI(contents) { +DebuggerUI::DebuggerUI(TabContents* contents) : DOMUI(contents) { AddMessageHandler(new DebuggerHandler(this)); DebuggerHTMLSource* html_source = new DebuggerHTMLSource(); diff --git a/chrome/browser/dom_ui/debugger_ui.h b/chrome/browser/dom_ui/debugger_ui.h index 8cefc66..f64fc36 100644 --- a/chrome/browser/dom_ui/debugger_ui.h +++ b/chrome/browser/dom_ui/debugger_ui.h @@ -11,7 +11,7 @@ class DebuggerUI : public DOMUI { public: - DebuggerUI(WebContents* contents); + DebuggerUI(TabContents* contents); private: DISALLOW_COPY_AND_ASSIGN(DebuggerUI); diff --git a/chrome/browser/dom_ui/devtools_ui.cc b/chrome/browser/dom_ui/devtools_ui.cc index daf2de6..04fcd04 100644 --- a/chrome/browser/dom_ui/devtools_ui.cc +++ b/chrome/browser/dom_ui/devtools_ui.cc @@ -8,7 +8,7 @@ #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" -DevToolsUI::DevToolsUI(WebContents* contents) : DOMUI(contents) { +DevToolsUI::DevToolsUI(TabContents* contents) : DOMUI(contents) { } void DevToolsUI::RenderViewCreated(RenderViewHost* render_view_host) { diff --git a/chrome/browser/dom_ui/devtools_ui.h b/chrome/browser/dom_ui/devtools_ui.h index afc9fe5..ecdc413 100644 --- a/chrome/browser/dom_ui/devtools_ui.h +++ b/chrome/browser/dom_ui/devtools_ui.h @@ -9,7 +9,7 @@ class DevToolsUI : public DOMUI { public: - explicit DevToolsUI(WebContents* contents); + explicit DevToolsUI(TabContents* contents); // DOMUI overrides. virtual void RenderViewCreated(RenderViewHost* render_view_host); diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc index ea9e1a5..54325b4 100644 --- a/chrome/browser/dom_ui/dom_ui.cc +++ b/chrome/browser/dom_ui/dom_ui.cc @@ -8,17 +8,17 @@ #include "base/json_writer.h" #include "base/string_util.h" #include "base/values.h" -#include "chrome/browser/tab_contents/web_contents.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/l10n_util.h" #include "chrome/common/stl_util-inl.h" -DOMUI::DOMUI(WebContents* contents) +DOMUI::DOMUI(TabContents* contents) : hide_favicon_(false), force_bookmark_bar_visible_(false), focus_location_bar_by_default_(false), should_hide_url_(false), link_transition_type_(PageTransition::LINK), - web_contents_(contents) { + tab_contents_(contents) { } DOMUI::~DOMUI() { @@ -85,7 +85,7 @@ void DOMUI::RegisterMessageCallback(const std::string &message, } Profile* DOMUI::GetProfile() { - return web_contents()->profile(); + return tab_contents()->profile(); } // DOMUI, protected: ---------------------------------------------------------- @@ -97,7 +97,7 @@ void DOMUI::AddMessageHandler(DOMMessageHandler* handler) { // DOMUI, private: ------------------------------------------------------------ void DOMUI::ExecuteJavascript(const std::wstring& javascript) { - web_contents()->render_view_host()->ExecuteJavascriptInWebFrame( + tab_contents()->render_view_host()->ExecuteJavascriptInWebFrame( std::wstring(), javascript); } diff --git a/chrome/browser/dom_ui/dom_ui.h b/chrome/browser/dom_ui/dom_ui.h index 68db631..3c2dc16 100644 --- a/chrome/browser/dom_ui/dom_ui.h +++ b/chrome/browser/dom_ui/dom_ui.h @@ -20,13 +20,13 @@ class GURL; class Profile; class RenderViewHost; class Value; -class WebContents; +class TabContents; // A DOMUI sets up the datasources and message handlers for a given HTML-based // UI. It is contained by a DOMUIManager. class DOMUI { public: - explicit DOMUI(WebContents* contents); + explicit DOMUI(TabContents* contents); virtual ~DOMUI(); virtual void RenderViewCreated(RenderViewHost* render_view_host) {} @@ -89,7 +89,7 @@ class DOMUI { const Value& arg1, const Value& arg2); - WebContents* web_contents() { return web_contents_; } + TabContents* tab_contents() { return tab_contents_; } Profile* GetProfile(); @@ -109,8 +109,8 @@ class DOMUI { // Execute a string of raw Javascript on the page. void ExecuteJavascript(const std::wstring& javascript); - // Non-owning pointer to the WebContents this DOMUI is associated with. - WebContents* web_contents_; + // Non-owning pointer to the TabContents this DOMUI is associated with. + TabContents* tab_contents_; // The DOMMessageHandlers we own. std::vector<DOMMessageHandler*> handlers_; diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc index d90ab39..c2dea2d 100644 --- a/chrome/browser/dom_ui/dom_ui_factory.cc +++ b/chrome/browser/dom_ui/dom_ui_factory.cc @@ -22,23 +22,23 @@ // web contents and the new_ui. The return value will indiacate whether a DOM UI // exists for the given URL. // -// If you want to create a DOM UI, pass non-NULL pointers for both web_contents +// If you want to create a DOM UI, pass non-NULL pointers for both tab_contents // and new_ui. The *new_ui pointer will be filled with the created UI if it // succeeds (indicated by a return value of true). The caller owns the *new_ui // pointer. -static bool CreateDOMUI(const GURL& url, WebContents* web_contents, +static bool CreateDOMUI(const GURL& url, TabContents* tab_contents, DOMUI** new_ui) { // Currently, any gears: URL means an HTML dialog. if (url.SchemeIs(chrome::kGearsScheme)) { if (new_ui) - *new_ui = new HtmlDialogUI(web_contents); + *new_ui = new HtmlDialogUI(tab_contents); return true; } #ifdef CHROME_PERSONALIZATION if (Personalization::NeedsDOMUI(url)) { if (new_ui) - *new_ui = new HtmlDialogUI(web_contents); + *new_ui = new HtmlDialogUI(tab_contents); return true; } #endif @@ -56,7 +56,7 @@ static bool CreateDOMUI(const GURL& url, WebContents* web_contents, if (url.host() == chrome::kChromeUINewTabHost || url.SchemeIs(chrome::kChromeInternalScheme)) { if (new_ui) - *new_ui = new NewTabUI(web_contents); + *new_ui = new NewTabUI(tab_contents); return true; } @@ -64,31 +64,31 @@ static bool CreateDOMUI(const GURL& url, WebContents* web_contents, // after the host name. if (url.host() == chrome::kChromeUIHistoryHost) { if (new_ui) - *new_ui = new HistoryUI(web_contents); + *new_ui = new HistoryUI(tab_contents); return true; } if (url.host() == chrome::kChromeUIDownloadsHost) { if (new_ui) - *new_ui = new DownloadsUI(web_contents); + *new_ui = new DownloadsUI(tab_contents); return true; } if (url.host() == chrome::kChromeUIExtensionsHost) { if (new_ui) - *new_ui = new ExtensionsUI(web_contents); + *new_ui = new ExtensionsUI(tab_contents); return true; } if (url.host() == chrome::kChromeUIInspectorHost) { if (new_ui) - *new_ui = new DebuggerUI(web_contents); + *new_ui = new DebuggerUI(tab_contents); return true; } if (url.host() == chrome::kChromeUIDevToolsHost) { if (new_ui) - *new_ui = new DevToolsUI(web_contents); + *new_ui = new DevToolsUI(tab_contents); return true; } @@ -107,10 +107,10 @@ bool DOMUIFactory::UseDOMUIForURL(const GURL& url) { } // static -DOMUI* DOMUIFactory::CreateDOMUIForURL(WebContents* web_contents, +DOMUI* DOMUIFactory::CreateDOMUIForURL(TabContents* tab_contents, const GURL& url) { DOMUI* dom_ui; - if (!CreateDOMUI(url, web_contents, &dom_ui)) + if (!CreateDOMUI(url, tab_contents, &dom_ui)) return NULL; return dom_ui; } diff --git a/chrome/browser/dom_ui/dom_ui_factory.h b/chrome/browser/dom_ui/dom_ui_factory.h index 1641a8a..77c7c98 100644 --- a/chrome/browser/dom_ui/dom_ui_factory.h +++ b/chrome/browser/dom_ui/dom_ui_factory.h @@ -7,7 +7,7 @@ class DOMUI;
class GURL;
-class WebContents;
+class TabContents;
class DOMUIFactory {
public:
@@ -23,7 +23,7 @@ class DOMUIFactory { // Allocates a new DOMUI object for the given URL, and returns it. If the URL
// is not a DOM UI URL, then it will return NULL. When non-NULL, ownership of
// the returned pointer is passed to the caller.
- static DOMUI* CreateDOMUIForURL(WebContents* web_contents, const GURL& url);
+ static DOMUI* CreateDOMUIForURL(TabContents* tab_contents, const GURL& url);
private:
// Class is for scoping only.
diff --git a/chrome/browser/dom_ui/dom_ui_unittest.cc b/chrome/browser/dom_ui/dom_ui_unittest.cc index e108c23..43a3f71 100644 --- a/chrome/browser/dom_ui/dom_ui_unittest.cc +++ b/chrome/browser/dom_ui/dom_ui_unittest.cc @@ -15,7 +15,7 @@ class DOMUITest : public RenderViewHostTestHarness { // state, through pending, committed, then another navigation. The first page // ID that we should use is passed as a parameter. We'll use the next two // values. This must be increasing for the life of the tests. - static void DoNavigationTest(WebContents* contents, int page_id) { + static void DoNavigationTest(TabContents* contents, int page_id) { NavigationController* controller = &contents->controller(); // Start a pending load. @@ -79,16 +79,16 @@ class DOMUITest : public RenderViewHostTestHarness { }; // Tests that the New Tab Page flags are correctly set and propogated by -// WebContents when we first navigate to a DOM UI page, then to a standard +// TabContents when we first navigate to a DOM UI page, then to a standard // non-DOM-UI page. TEST_F(DOMUITest, DOMUIToStandard) { DoNavigationTest(contents(), 1); // Test the case where we're not doing the initial navigation. This is // slightly different than the very-first-navigation case since the - // SiteInstance will be the same (the original WebContents must still be + // SiteInstance will be the same (the original TabContents must still be // alive), which will trigger different behavior in RenderViewHostManager. - TestWebContents contents2(profile_.get(), NULL); + TestTabContents contents2(profile_.get(), NULL); DoNavigationTest(&contents2, 101); } diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc index 1bc5794..639be99 100644 --- a/chrome/browser/dom_ui/downloads_ui.cc +++ b/chrome/browser/dom_ui/downloads_ui.cc @@ -509,7 +509,7 @@ std::wstring DownloadsDOMHandler::GetProgressStatusText( // /////////////////////////////////////////////////////////////////////////////// -DownloadsUI::DownloadsUI(WebContents* contents) : DOMUI(contents) { +DownloadsUI::DownloadsUI(TabContents* contents) : DOMUI(contents) { DownloadManager* dlm = GetProfile()->GetDownloadManager(); DownloadsDOMHandler* handler = new DownloadsDOMHandler(this, dlm); diff --git a/chrome/browser/dom_ui/downloads_ui.h b/chrome/browser/dom_ui/downloads_ui.h index ed435e1..a24e07b 100644 --- a/chrome/browser/dom_ui/downloads_ui.h +++ b/chrome/browser/dom_ui/downloads_ui.h @@ -9,7 +9,7 @@ class DownloadsUI : public DOMUI { public: - explicit DownloadsUI(WebContents* contents); + explicit DownloadsUI(TabContents* contents); private: DISALLOW_COPY_AND_ASSIGN(DownloadsUI); diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc index b9cba34..25f84ba 100644 --- a/chrome/browser/dom_ui/history_ui.cc +++ b/chrome/browser/dom_ui/history_ui.cc @@ -362,7 +362,7 @@ void BrowsingHistoryHandler::Observe(NotificationType type, // //////////////////////////////////////////////////////////////////////////////// -HistoryUI::HistoryUI(WebContents* contents) : DOMUI(contents) { +HistoryUI::HistoryUI(TabContents* contents) : DOMUI(contents) { AddMessageHandler(new BrowsingHistoryHandler(this)); HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); diff --git a/chrome/browser/dom_ui/history_ui.h b/chrome/browser/dom_ui/history_ui.h index 41bba82..a4f201c 100644 --- a/chrome/browser/dom_ui/history_ui.h +++ b/chrome/browser/dom_ui/history_ui.h @@ -81,7 +81,7 @@ class BrowsingHistoryHandler : public DOMMessageHandler, class HistoryUI : public DOMUI { public: - explicit HistoryUI(WebContents* contents); + explicit HistoryUI(TabContents* contents); // Return the URL for a given search term. static const GURL GetHistoryURLWithSearchText(const std::wstring& text); diff --git a/chrome/browser/dom_ui/html_dialog_ui.cc b/chrome/browser/dom_ui/html_dialog_ui.cc index 4062438..060625d 100644 --- a/chrome/browser/dom_ui/html_dialog_ui.cc +++ b/chrome/browser/dom_ui/html_dialog_ui.cc @@ -6,10 +6,10 @@ #include "base/singleton.h" #include "base/values.h" -#include "chrome/browser/tab_contents/web_contents.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/renderer_host/render_view_host.h" -HtmlDialogUI::HtmlDialogUI(WebContents* web_contents) : DOMUI(web_contents) { +HtmlDialogUI::HtmlDialogUI(TabContents* tab_contents) : DOMUI(tab_contents) { } HtmlDialogUI::~HtmlDialogUI() { @@ -62,7 +62,7 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) { // Pass the arguments to the renderer supplied by the delegate. std::string dialog_args; HtmlDialogUIDelegate** delegate = GetPropertyAccessor().GetProperty( - web_contents()->property_bag()); + tab_contents()->property_bag()); if (delegate) dialog_args = (*delegate)->GetDialogArgs(); render_view_host->SetDOMUIProperty("dialogArguments", dialog_args); @@ -70,7 +70,7 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) { void HtmlDialogUI::OnDialogClosed(const Value* content) { HtmlDialogUIDelegate** delegate = GetPropertyAccessor().GetProperty( - web_contents()->property_bag()); + tab_contents()->property_bag()); if (delegate) (*delegate)->OnDialogClosed(GetJsonResponse(content)); } diff --git a/chrome/browser/dom_ui/html_dialog_ui.h b/chrome/browser/dom_ui/html_dialog_ui.h index 070315f..29895d2 100644 --- a/chrome/browser/dom_ui/html_dialog_ui.h +++ b/chrome/browser/dom_ui/html_dialog_ui.h @@ -37,13 +37,13 @@ class HtmlDialogUIDelegate { // Displays file URL contents inside a modal HTML dialog. // -// This application really should not use WebContents + DOMUI. It should instead +// This application really should not use TabContents + DOMUI. It should instead // just embed a RenderView in a dialog and be done with it. // // Before loading a URL corresponding to this DOMUI, the caller should set its -// delegate as a property on the WebContents. This DOMUI will pick it up from +// delegate as a property on the TabContents. This DOMUI will pick it up from // there and call it back. This is a bit of a hack to allow the dialog to pass -// its delegate to the DOM UI without having nasty accessors on the WebContents. +// its delegate to the DOM UI without having nasty accessors on the TabContents. // The correct design using RVH directly would avoid all of this. class HtmlDialogUI : public DOMUI { public: @@ -58,12 +58,12 @@ class HtmlDialogUI : public DOMUI { std::string json_input; }; - // When created, the property should already be set on the WebContents. - HtmlDialogUI(WebContents* web_contents); + // When created, the property should already be set on the TabContents. + HtmlDialogUI(TabContents* tab_contents); virtual ~HtmlDialogUI(); // Returns the PropertyBag accessor object used to write the delegate pointer - // into the WebContents (see class-level comment above). + // into the TabContents (see class-level comment above). static PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); private: diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 9965b43..a187560 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -22,7 +22,7 @@ #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/tab_contents/navigation_entry.h" -#include "chrome/browser/tab_contents/web_contents.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/sessions/tab_restore_service.h" #include "chrome/browser/user_data_manager.h" @@ -688,7 +688,7 @@ void TemplateURLHandler::HandleDoSearch(const Value* content) { } // Load the URL. - dom_ui_->web_contents()->OpenURL(url, GURL(), CURRENT_TAB, + dom_ui_->tab_contents()->OpenURL(url, GURL(), CURRENT_TAB, PageTransition::LINK); // We've been deleted. return; @@ -893,7 +893,7 @@ RecentlyClosedTabsHandler::~RecentlyClosedTabsHandler() { void RecentlyClosedTabsHandler::HandleReopenTab(const Value* content) { Browser* browser = Browser::GetBrowserForController( - &dom_ui_->web_contents()->controller(), NULL); + &dom_ui_->tab_contents()->controller(), NULL); if (!browser) return; @@ -1054,7 +1054,7 @@ void HistoryHandler::HandleSearchHistoryPage(const Value* content) { #if defined(OS_WIN) // TODO(port): include this once history is converted to HTML - dom_ui_->web_contents()->controller().LoadURL( + dom_ui_->tab_contents()->controller().LoadURL( HistoryUI::GetHistoryURLWithSearchText(wstring_value), GURL(), PageTransition::LINK); @@ -1117,7 +1117,7 @@ void MetricsHandler::HandleMetrics(const Value* content) { /////////////////////////////////////////////////////////////////////////////// // NewTabUI -NewTabUI::NewTabUI(WebContents* contents) +NewTabUI::NewTabUI(TabContents* contents) : DOMUI(contents), motd_message_id_(0), incognito_(false) { @@ -1139,7 +1139,7 @@ NewTabUI::NewTabUI(WebContents* contents) NewTabHTMLSource::set_first_view(false); } - web_contents()->render_view_host()->set_paint_observer(new PaintTimer); + tab_contents()->render_view_host()->set_paint_observer(new PaintTimer); if (GetProfile()->IsOffTheRecord()) { incognito_ = true; diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h index ef101b3..8e3b560 100644 --- a/chrome/browser/dom_ui/new_tab_ui.h +++ b/chrome/browser/dom_ui/new_tab_ui.h @@ -14,7 +14,7 @@ class Profile; // The TabContents used for the New Tab page. class NewTabUI : public DOMUI { public: - explicit NewTabUI(WebContents* manager); + explicit NewTabUI(TabContents* manager); ~NewTabUI(); static void RegisterUserPrefs(PrefService* prefs); |