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

Unified Diff: chrome/browser/ui/webui/bug_report_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 | « chrome/browser/ui/webui/bug_report_ui.h ('k') | chrome/browser/ui/webui/certificate_viewer_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/bug_report_ui.cc
===================================================================
--- chrome/browser/ui/webui/bug_report_ui.cc (revision 116011)
+++ chrome/browser/ui/webui/bug_report_ui.cc (working copy)
@@ -20,14 +20,16 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/browser/ui/webui/screenshot_source.h"
#include "chrome/browser/ui/window_snapshot/window_snapshot.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -45,6 +47,7 @@
#endif
using content::BrowserThread;
+using content::WebContents;
namespace {
@@ -108,7 +111,7 @@
int GetIndexOfFeedbackTab(Browser* browser) {
GURL bug_report_url(chrome::kChromeUIBugReportURL);
for (int i = 0; i < browser->tab_count(); ++i) {
- TabContents* tab = browser->GetTabContentsAt(i);
+ WebContents* tab = browser->GetTabContentsWrapperAt(i)->web_contents();
if (tab && tab->GetURL().GetWithEmptyPath() == bug_report_url)
return i;
}
@@ -159,7 +162,7 @@
class BugReportHandler : public WebUIMessageHandler,
public base::SupportsWeakPtr<BugReportHandler> {
public:
- explicit BugReportHandler(TabContents* tab);
+ explicit BugReportHandler(content::WebContents* tab);
virtual ~BugReportHandler();
// Init work after Attach. Returns true on success.
@@ -184,7 +187,7 @@
void CancelFeedbackCollection();
void CloseFeedbackTab();
- TabContents* tab_;
+ WebContents* tab_;
ScreenshotSource* screenshot_source_;
BugReportData* bug_report_data_;
@@ -307,7 +310,7 @@
// BugReportHandler
//
////////////////////////////////////////////////////////////////////////////////
-BugReportHandler::BugReportHandler(TabContents* tab)
+BugReportHandler::BugReportHandler(WebContents* tab)
: tab_(tab),
screenshot_source_(NULL),
bug_report_data_(NULL)
@@ -375,7 +378,8 @@
return false;
}
- TabContents* target_tab = browser->GetTabContentsAt(index);
+ WebContents* target_tab =
+ browser->GetTabContentsWrapperAt(index)->web_contents();
if (target_tab) {
target_tab_url_ = target_tab->GetURL().spec();
}
@@ -612,7 +616,7 @@
// BugReportUI
//
////////////////////////////////////////////////////////////////////////////////
-BugReportUI::BugReportUI(TabContents* tab) : HtmlDialogUI(tab) {
+BugReportUI::BugReportUI(WebContents* tab) : HtmlDialogUI(tab) {
BugReportHandler* handler = new BugReportHandler(tab);
AddMessageHandler(handler);
« no previous file with comments | « chrome/browser/ui/webui/bug_report_ui.h ('k') | chrome/browser/ui/webui/certificate_viewer_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698