| Index: chrome/browser/cocoa/constrained_window_mac.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/constrained_window_mac.mm (revision 36364)
|
| +++ chrome/browser/cocoa/constrained_window_mac.mm (working copy)
|
| @@ -46,10 +46,16 @@
|
| TabContents* owner, ConstrainedWindowMacDelegate* delegate)
|
| : owner_(owner),
|
| delegate_(delegate),
|
| - controller_(nil) {
|
| + controller_(nil),
|
| + should_be_visible_(false) {
|
| DCHECK(owner);
|
| DCHECK(delegate);
|
| +}
|
|
|
| +ConstrainedWindowMac::~ConstrainedWindowMac() {}
|
| +
|
| +void ConstrainedWindowMac::ShowConstrainedWindow() {
|
| + should_be_visible_ = true;
|
| // The TabContents only has a native window if it is currently visible. In
|
| // this case, open the sheet now. Else, Realize() will be called later, when
|
| // our tab becomes visible.
|
| @@ -61,8 +67,6 @@
|
| }
|
| }
|
|
|
| -ConstrainedWindowMac::~ConstrainedWindowMac() {}
|
| -
|
| void ConstrainedWindowMac::CloseConstrainedWindow() {
|
| // Note: controller_ can be `nil` here if the sheet was never realized. That's
|
| // ok.
|
| @@ -74,6 +78,9 @@
|
| }
|
|
|
| void ConstrainedWindowMac::Realize(BrowserWindowController* controller) {
|
| + if (!should_be_visible_)
|
| + return;
|
| +
|
| if (controller_ != nil) {
|
| DCHECK(controller_ == controller);
|
| return;
|
| @@ -82,13 +89,7 @@
|
|
|
| // Remember the controller we're adding ourselves to, so that we can later
|
| // remove us from it.
|
| - if ([controller attachConstrainedWindow:this])
|
| - controller_ = controller;
|
| -}
|
| -
|
| -void ConstrainedWindowMac::SetVisible() {
|
| - // Only notify the delegate that the sheet is open after the sheet appeared
|
| - // on screen (as opposed to when the sheet was added to the current tab's
|
| - // sheet queue).
|
| + controller_ = controller;
|
| + [controller_ attachConstrainedWindow:this];
|
| delegate_->set_sheet_open(true);
|
| }
|
|
|
| Property changes on: chrome\browser\cocoa\constrained_window_mac.mm
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|