Index: chrome/browser/ui/cocoa/browser_window_controller.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm |
index c650777b21fcce8d1dc245f41ec27180e2aa593d..b68115bf507da881b8689c6ca39842d6183a3de5 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
@@ -63,6 +63,7 @@ |
#import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" |
#import "chrome/browser/ui/cocoa/tabs/tab_view.h" |
#import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
+#include "chrome/browser/ui/constrained_window_tab_helper.h" |
#include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
#include "chrome/browser/ui/omnibox/location_bar.h" |
#include "chrome/browser/ui/tab_contents/tab_contents.h" |
@@ -528,18 +529,6 @@ enum { |
afterDelay:0]; |
} |
-- (void)attachConstrainedWindow:(ConstrainedWindowMac*)window { |
- [tabStripController_ attachConstrainedWindow:window]; |
-} |
- |
-- (void)removeConstrainedWindow:(ConstrainedWindowMac*)window { |
- [tabStripController_ removeConstrainedWindow:window]; |
-} |
- |
-- (BOOL)canAttachConstrainedWindow { |
- return ![previewableContentsController_ isShowingPreview]; |
-} |
- |
- (void)updateDevToolsForContents:(WebContents*)contents { |
[devToolsController_ updateDevToolsForWebContents:contents |
withProfile:browser_->profile()]; |
@@ -1532,6 +1521,17 @@ enum { |
return [self supportsWindowFeature:Browser::FEATURE_TABSTRIP]; |
} |
+- (BOOL)isTabDraggable:(NSView*)tabView { |
+ // TODO(avi, thakis): GTMWindowSheetController has no api to move tabsheets |
+ // between windows. Until then, we have to prevent having to move a tabsheet |
+ // between windows, e.g. no tearing off of tabs. |
+ int index = [tabStripController_ modelIndexForTabView:tabView]; |
+ TabContents* contents = chrome::GetTabContentsAt(browser_.get(), index); |
+ if (!contents) |
+ return NO; |
+ return !contents->constrained_window_tab_helper()->constrained_window_count(); |
+} |
+ |
// TabStripControllerDelegate protocol. |
- (void)onActivateTabWithContents:(WebContents*)contents { |
// Update various elements that are interested in knowing the current |
@@ -1940,6 +1940,10 @@ willAnimateFromState:(bookmarks::VisualState)oldState |
instant->CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST); |
} |
+- (BOOL)isShowingInstant { |
+ return previewableContentsController_ && |
+ [previewableContentsController_ isShowingPreview]; |
+} |
- (NSRect)instantFrame { |
// The view's bounds are in its own coordinate system. Convert that to the |