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

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm

Issue 1430023002: Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per erikchen@'s comments. Created 5 years, 1 month 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 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" 5 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, 59 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
60 content::Source<TabSpecificContentSettings>(content_settings)); 60 content::Source<TabSpecificContentSettings>(content_settings));
61 61
62 sheet_controller_.reset([[CollectedCookiesWindowController alloc] 62 sheet_controller_.reset([[CollectedCookiesWindowController alloc]
63 initWithWebContents:web_contents 63 initWithWebContents:web_contents
64 collectedCookiesMac:this]); 64 collectedCookiesMac:this]);
65 65
66 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( 66 base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
67 [[CustomConstrainedWindowSheet alloc] 67 [[CustomConstrainedWindowSheet alloc]
68 initWithCustomWindow:[sheet_controller_ window]]); 68 initWithCustomWindow:[sheet_controller_ window]]);
69 window_.reset(new ConstrainedWindowMac( 69 window_.reset(CreateAndShowWebModalDialogMac(this, web_contents, sheet));
70 this, web_contents, sheet));
71 } 70 }
72 71
73 CollectedCookiesMac::~CollectedCookiesMac() { 72 CollectedCookiesMac::~CollectedCookiesMac() {
74 } 73 }
75 74
76 void CollectedCookiesMac::Observe(int type, 75 void CollectedCookiesMac::Observe(int type,
77 const content::NotificationSource& source, 76 const content::NotificationSource& source,
78 const content::NotificationDetails& details) { 77 const content::NotificationDetails& details) {
79 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); 78 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
80 window_->CloseWebContentsModalDialog(); 79 window_->CloseWebContentsModalDialog();
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 treeController = blockedTreeController_; 506 treeController = blockedTreeController_;
508 break; 507 break;
509 default: 508 default:
510 NOTREACHED(); 509 NOTREACHED();
511 return; 510 return;
512 } 511 }
513 [detailsViewController_ configureBindingsForTreeController:treeController]; 512 [detailsViewController_ configureBindingsForTreeController:treeController];
514 } 513 }
515 514
516 @end 515 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698