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

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

Issue 754953002: Enable AutoResize for Constrained Web Dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: per miu's comments Created 6 years 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 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 [[window_ contentView] addSubview:GetWebContents()->GetNativeView()]; 108 [[window_ contentView] addSubview:GetWebContents()->GetNativeView()];
109 109
110 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( 110 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
111 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]); 111 [[CustomConstrainedWindowSheet alloc] initWithCustomWindow:window_]);
112 constrained_window_.reset(new ConstrainedWindowMac( 112 constrained_window_.reset(new ConstrainedWindowMac(
113 this, web_contents, sheet)); 113 this, web_contents, sheet));
114 114
115 impl_->set_window(constrained_window_.get()); 115 impl_->set_window(constrained_window_.get());
116 } 116 }
117 117
118 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( 118 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog(
119 content::BrowserContext* browser_context, 119 content::BrowserContext* browser_context,
120 WebDialogDelegate* delegate, 120 WebDialogDelegate* delegate,
121 content::WebContents* web_contents) { 121 content::WebContents* web_contents) {
122 // Deleted when the dialog closes. 122 // Deleted when the dialog closes.
123 ConstrainedWebDialogDelegateViewMac* constrained_delegate = 123 ConstrainedWebDialogDelegateViewMac* constrained_delegate =
124 new ConstrainedWebDialogDelegateViewMac( 124 new ConstrainedWebDialogDelegateViewMac(
125 browser_context, delegate, web_contents); 125 browser_context, delegate, web_contents);
126 return constrained_delegate; 126 return constrained_delegate;
127 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698