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

Side by Side Diff: chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc

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: reduced diff Created 4 years, 5 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 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ui::WebDialogDelegate* delegate, 269 ui::WebDialogDelegate* delegate,
270 content::WebContents* web_contents) { 270 content::WebContents* web_contents) {
271 ConstrainedWebDialogDelegateViewViews* dialog = 271 ConstrainedWebDialogDelegateViewViews* dialog =
272 new ConstrainedWebDialogDelegateViewViews( 272 new ConstrainedWebDialogDelegateViewViews(
273 browser_context, delegate, web_contents, 273 browser_context, delegate, web_contents,
274 gfx::Size(), gfx::Size()); 274 gfx::Size(), gfx::Size());
275 constrained_window::ShowWebModalDialogViews(dialog, web_contents); 275 constrained_window::ShowWebModalDialogViews(dialog, web_contents);
276 return dialog; 276 return dialog;
277 } 277 }
278 278
279 ConstrainedWebDialogDelegate* ShowTopLevelConstrainedWebDialog(
280 content::BrowserContext* browser_context,
281 ui::WebDialogDelegate* delegate,
282 content::WebContents* web_contents) {
283 ConstrainedWebDialogDelegateViewViews* dialog =
284 new ConstrainedWebDialogDelegateViewViews(
285 browser_context, delegate, web_contents,
286 gfx::Size(), gfx::Size());
287 #if !defined(OS_MACOSX) // May want to make this Chrome OS only rather
rbpotter 2016/07/25 18:53:28 In what cases should the new set of code (allowing
288 // than all non-MAC, TBD.
289 dialog->set_top_level(true);
290 #endif
291 constrained_window::ShowWebModalDialogViews(dialog, web_contents);
292 return dialog;
293 }
294
279 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( 295 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize(
280 content::BrowserContext* browser_context, 296 content::BrowserContext* browser_context,
281 ui::WebDialogDelegate* delegate, 297 ui::WebDialogDelegate* delegate,
282 content::WebContents* web_contents, 298 content::WebContents* web_contents,
283 const gfx::Size& min_size, 299 const gfx::Size& min_size,
284 const gfx::Size& max_size) { 300 const gfx::Size& max_size) {
285 DCHECK(!min_size.IsEmpty()); 301 DCHECK(!min_size.IsEmpty());
286 DCHECK(!max_size.IsEmpty()); 302 DCHECK(!max_size.IsEmpty());
287 ConstrainedWebDialogDelegateViewViews* dialog = 303 ConstrainedWebDialogDelegateViewViews* dialog =
288 new ConstrainedWebDialogDelegateViewViews( 304 new ConstrainedWebDialogDelegateViewViews(
289 browser_context, delegate, web_contents, 305 browser_context, delegate, web_contents,
290 min_size, max_size); 306 min_size, max_size);
291 constrained_window::CreateWebModalDialogViews(dialog, web_contents); 307 constrained_window::CreateWebModalDialogViews(dialog, web_contents);
292 return dialog; 308 return dialog;
293 } 309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698