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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm

Issue 7880003: content: Move constrained window code from TabContents to TabContentsWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix views merge part 2 Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/constrained_html_ui.h" 5 #include "chrome/browser/ui/webui/constrained_html_ui.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/memory/scoped_nsobject.h" 9 #include "base/memory/scoped_nsobject.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // static 133 // static
134 ConstrainedWindow* ConstrainedHtmlUI::CreateConstrainedHtmlDialog( 134 ConstrainedWindow* ConstrainedHtmlUI::CreateConstrainedHtmlDialog(
135 Profile* profile, 135 Profile* profile,
136 HtmlDialogUIDelegate* delegate, 136 HtmlDialogUIDelegate* delegate,
137 TabContentsWrapper* wrapper) { 137 TabContentsWrapper* wrapper) {
138 // Deleted when ConstrainedHtmlDelegateMac::DeleteDelegate() runs. 138 // Deleted when ConstrainedHtmlDelegateMac::DeleteDelegate() runs.
139 ConstrainedHtmlDelegateMac* constrained_delegate = 139 ConstrainedHtmlDelegateMac* constrained_delegate =
140 new ConstrainedHtmlDelegateMac(profile, delegate); 140 new ConstrainedHtmlDelegateMac(profile, delegate);
141 // Deleted when ConstrainedHtmlDelegateMac::OnDialogCloseFromWebUI() runs. 141 // Deleted when ConstrainedHtmlDelegateMac::OnDialogCloseFromWebUI() runs.
142 ConstrainedWindow* constrained_window = 142 ConstrainedWindow* constrained_window =
143 new ConstrainedWindowMac(wrapper->tab_contents(), constrained_delegate); 143 new ConstrainedWindowMac(wrapper, constrained_delegate);
144 constrained_delegate->set_window(constrained_window); 144 constrained_delegate->set_window(constrained_window);
145 return constrained_window; 145 return constrained_window;
146 } 146 }
147 147
148 @implementation ConstrainedHtmlDialogSheetCocoa 148 @implementation ConstrainedHtmlDialogSheetCocoa
149 149
150 - (id)initWithConstrainedHtmlDelegateMac: 150 - (id)initWithConstrainedHtmlDelegateMac:
151 (ConstrainedHtmlDelegateMac*)ConstrainedHtmlDelegateMac { 151 (ConstrainedHtmlDelegateMac*)ConstrainedHtmlDelegateMac {
152 if ((self = [super init])) 152 if ((self = [super init]))
153 constrainedHtmlDelegate_ = ConstrainedHtmlDelegateMac; 153 constrainedHtmlDelegate_ = ConstrainedHtmlDelegateMac;
154 return self; 154 return self;
155 } 155 }
156 156
157 - (void)sheetDidEnd:(NSWindow*)sheet 157 - (void)sheetDidEnd:(NSWindow*)sheet
158 returnCode:(int)returnCode 158 returnCode:(int)returnCode
159 contextInfo:(void *)contextInfo { 159 contextInfo:(void *)contextInfo {
160 [sheet orderOut:self]; 160 [sheet orderOut:self];
161 } 161 }
162 162
163 @end 163 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698