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

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

Issue 11111022: Remove TabContents from constrained windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unrelated gtk code Created 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/constrained_window/constrained_window_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_web_dialog_delegate_base.h" 5 #include "chrome/browser/ui/webui/constrained_web_dialog_delegate_base.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/ui/cocoa/constrained_window_mac.h" 10 #include "chrome/browser/ui/cocoa/constrained_window_mac.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Profile* profile, 121 Profile* profile,
122 WebDialogDelegate* delegate, 122 WebDialogDelegate* delegate,
123 WebDialogWebContentsDelegate* tab_delegate, 123 WebDialogWebContentsDelegate* tab_delegate,
124 TabContents* tab_contents) { 124 TabContents* tab_contents) {
125 // Deleted when ConstrainedWebDialogDelegateMac::DeleteDelegate() runs. 125 // Deleted when ConstrainedWebDialogDelegateMac::DeleteDelegate() runs.
126 ConstrainedWebDialogDelegateMac* constrained_delegate = 126 ConstrainedWebDialogDelegateMac* constrained_delegate =
127 new ConstrainedWebDialogDelegateMac(profile, delegate, tab_delegate); 127 new ConstrainedWebDialogDelegateMac(profile, delegate, tab_delegate);
128 // Deleted when ConstrainedWebDialogDelegateMac::OnDialogCloseFromWebUI() 128 // Deleted when ConstrainedWebDialogDelegateMac::OnDialogCloseFromWebUI()
129 // runs. 129 // runs.
130 ConstrainedWindow* constrained_window = 130 ConstrainedWindow* constrained_window =
131 new ConstrainedWindowMac(tab_contents, constrained_delegate); 131 new ConstrainedWindowMac(tab_contents->web_contents(),
132 constrained_delegate);
132 constrained_delegate->set_window(constrained_window); 133 constrained_delegate->set_window(constrained_window);
133 return constrained_delegate; 134 return constrained_delegate;
134 } 135 }
135 136
136 @implementation ConstrainedWebDialogSheetCocoa 137 @implementation ConstrainedWebDialogSheetCocoa
137 138
138 - (id)initWithConstrainedWebDialogDelegateMac: 139 - (id)initWithConstrainedWebDialogDelegateMac:
139 (ConstrainedWebDialogDelegateMac*)ConstrainedWebDialogDelegateMac { 140 (ConstrainedWebDialogDelegateMac*)ConstrainedWebDialogDelegateMac {
140 if ((self = [super init])) 141 if ((self = [super init]))
141 constrainedWebDelegate_ = ConstrainedWebDialogDelegateMac; 142 constrainedWebDelegate_ = ConstrainedWebDialogDelegateMac;
142 return self; 143 return self;
143 } 144 }
144 145
145 - (void)sheetDidEnd:(NSWindow*)sheet 146 - (void)sheetDidEnd:(NSWindow*)sheet
146 returnCode:(int)returnCode 147 returnCode:(int)returnCode
147 contextInfo:(void *)contextInfo { 148 contextInfo:(void *)contextInfo {
148 [sheet orderOut:self]; 149 [sheet orderOut:self];
149 } 150 }
150 151
151 @end 152 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/constrained_window/constrained_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698