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

Unified Diff: chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc

Issue 11361046: Remove TabContents from TabModalConfirmDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing include Created 8 years, 1 month 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/tab_modal_confirm_dialog_webui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
diff --git a/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc b/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
index fe50560a198bbe673f7ee2c7eedc3f8be9ef0146..301c5552b606860a5137bb581828736ff67524be 100644
--- a/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
+++ b/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
@@ -15,13 +15,13 @@
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/constrained_window.h"
-#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/url_constants.h"
+#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -34,8 +34,8 @@ using content::WebUIMessageHandler;
// static
TabModalConfirmDialog* TabModalConfirmDialog::Create(
TabModalConfirmDialogDelegate* delegate,
- TabContents* tab_contents) {
- return new TabModalConfirmDialogWebUI(delegate, tab_contents);
+ content::WebContents* web_contents) {
+ return new TabModalConfirmDialogWebUI(delegate, web_contents);
}
const int kDialogWidth = 400;
@@ -43,19 +43,17 @@ const int kDialogHeight = 120;
TabModalConfirmDialogWebUI::TabModalConfirmDialogWebUI(
TabModalConfirmDialogDelegate* delegate,
- TabContents* tab_contents)
+ WebContents* web_contents)
: delegate_(delegate) {
- Profile* profile = tab_contents->profile();
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
ChromeWebUIDataSource* data_source =
new ChromeWebUIDataSource(chrome::kChromeUITabModalConfirmDialogHost);
data_source->set_default_resource(IDR_TAB_MODAL_CONFIRM_DIALOG_HTML);
ChromeURLDataManager::AddDataSource(profile, data_source);
constrained_web_dialog_delegate_ =
- CreateConstrainedWebDialog(profile,
- this,
- NULL,
- tab_contents->web_contents());
+ CreateConstrainedWebDialog(profile, this, NULL, web_contents);
delegate_->set_window(constrained_web_dialog_delegate_->window());
}
« no previous file with comments | « chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698