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

Side by Side Diff: chrome/browser/cocoa/constrained_window_mac.mm

Issue 384113: Mac: Only show one per-tab sheet at a time per tab. (Closed)
Patch Set: comments Created 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/constrained_window_mac.h" 5 #include "chrome/browser/cocoa/constrained_window_mac.h"
6 6
7 #import "chrome/browser/cocoa/browser_window_controller.h" 7 #import "chrome/browser/cocoa/browser_window_controller.h"
8 #include "chrome/browser/tab_contents/tab_contents.h" 8 #include "chrome/browser/tab_contents/tab_contents.h"
9 #include "chrome/browser/tab_contents/tab_contents_view.h" 9 #include "chrome/browser/tab_contents/tab_contents_view.h"
10 #import "third_party/GTM/AppKit/GTMWindowSheetController.h" 10 #import "third_party/GTM/AppKit/GTMWindowSheetController.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void ConstrainedWindowMac::Realize(BrowserWindowController* controller) { 76 void ConstrainedWindowMac::Realize(BrowserWindowController* controller) {
77 if (controller_ != nil) { 77 if (controller_ != nil) {
78 DCHECK(controller_ == controller); 78 DCHECK(controller_ == controller);
79 return; 79 return;
80 } 80 }
81 DCHECK(controller != nil); 81 DCHECK(controller != nil);
82 82
83 // Remember the controller we're adding ourselves to, so that we can later 83 // Remember the controller we're adding ourselves to, so that we can later
84 // remove us from it. 84 // remove us from it.
85 controller_ = controller; 85 if ([controller attachConstrainedWindow:this])
86 [controller_ attachConstrainedWindow:this]; 86 controller_ = controller;
87 }
88
89 void ConstrainedWindowMac::SetVisible() {
90 // Only notify the delegate that the sheet is open after the sheet appeared
91 // on screen (as opposed to when the sheet was added to the current tab's
92 // sheet queue).
87 delegate_->set_sheet_open(true); 93 delegate_->set_sheet_open(true);
88 } 94 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/constrained_window_mac.h ('k') | chrome/browser/cocoa/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698