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

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

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to CrOS only. Created 4 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 unified diff | Download patch
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/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 WebDialogDelegate* delegate, 238 WebDialogDelegate* delegate,
239 content::WebContents* web_contents) { 239 content::WebContents* web_contents) {
240 // Deleted when the dialog closes. 240 // Deleted when the dialog closes.
241 ConstrainedWebDialogDelegateViewMac* constrained_delegate = 241 ConstrainedWebDialogDelegateViewMac* constrained_delegate =
242 new ConstrainedWebDialogDelegateViewMac( 242 new ConstrainedWebDialogDelegateViewMac(
243 browser_context, delegate, web_contents, 243 browser_context, delegate, web_contents,
244 gfx::Size(), gfx::Size()); 244 gfx::Size(), gfx::Size());
245 return constrained_delegate; 245 return constrained_delegate;
246 } 246 }
247 247
248 ConstrainedWebDialogDelegate* ShowTopLevelConstrainedWebDialog(
249 content::BrowserContext* browser_context,
250 WebDialogDelegate* delegate,
251 content::WebContents* web_contents) {
252 // Deleted when the dialog closes.
253 NOTREACHED(); // This is not needed on Mac since Mac uses sheets.
254 ConstrainedWebDialogDelegateViewMac* constrained_delegate =
255 new ConstrainedWebDialogDelegateViewMac(
256 browser_context, delegate, web_contents, gfx::Size(), gfx::Size());
257 return constrained_delegate;
258 }
259
248 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( 260 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize(
249 content::BrowserContext* browser_context, 261 content::BrowserContext* browser_context,
250 WebDialogDelegate* delegate, 262 WebDialogDelegate* delegate,
251 content::WebContents* web_contents, 263 content::WebContents* web_contents,
252 const gfx::Size& min_size, 264 const gfx::Size& min_size,
253 const gfx::Size& max_size) { 265 const gfx::Size& max_size) {
254 DCHECK(!min_size.IsEmpty()); 266 DCHECK(!min_size.IsEmpty());
255 DCHECK(!max_size.IsEmpty()); 267 DCHECK(!max_size.IsEmpty());
256 // Deleted when the dialog closes. 268 // Deleted when the dialog closes.
257 ConstrainedWebDialogDelegateViewMac* constrained_delegate = 269 ConstrainedWebDialogDelegateViewMac* constrained_delegate =
258 new ConstrainedWebDialogDelegateViewMac( 270 new ConstrainedWebDialogDelegateViewMac(
259 browser_context, delegate, web_contents, 271 browser_context, delegate, web_contents,
260 min_size, max_size); 272 min_size, max_size);
261 return constrained_delegate; 273 return constrained_delegate;
262 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698