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

Unified Diff: chrome/browser/ui/cocoa/web_dialog_window_controller.mm

Issue 10868072: Make TabContents ctor private; poke hole for existing callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all green Created 8 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
Index: chrome/browser/ui/cocoa/web_dialog_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
index 805c29a2c9ccd28a849aed5e6016d512ee3cee9c..d74b1c71451b23b8cc739992662353d71190330e 100644
--- a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm
@@ -27,6 +27,14 @@ using ui::WebDialogDelegate;
using ui::WebDialogUI;
using ui::WebDialogWebContentsDelegate;
+// TODO(avi): Kill this when TabContents goes away.
+class WebDialogWindowControllerTabContentsCreator {
+ public:
+ static TabContents* CreateTabContents(content::WebContents* contents) {
+ return TabContents::Factory::CreateTabContents(contents);
+ }
+};
+
// Thin bridge that routes notifications to
// WebDialogWindowController's member variables.
class WebDialogWindowDelegateBridge
@@ -337,8 +345,10 @@ void WebDialogWindowDelegateBridge::HandleKeyboardEvent(
}
- (void)loadDialogContents {
- tabContents_.reset(new TabContents(WebContents::Create(
- delegate_->browser_context(), NULL, MSG_ROUTING_NONE, NULL)));
+ tabContents_.reset(
+ WebDialogWindowControllerTabContentsCreator::CreateTabContents(
+ WebContents::Create(
+ delegate_->browser_context(), NULL, MSG_ROUTING_NONE, NULL)));
[[self window]
setContentView:tabContents_->web_contents()->GetNativeView()];
tabContents_->web_contents()->SetDelegate(delegate_.get());
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm ('k') | chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698