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

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

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 } 1615 }
1616 1616
1617 - (BOOL)isTabDraggable:(NSView*)tabView { 1617 - (BOOL)isTabDraggable:(NSView*)tabView {
1618 // TODO(avi, thakis): ConstrainedWindowSheetController has no api to move 1618 // TODO(avi, thakis): ConstrainedWindowSheetController has no api to move
1619 // tabsheets between windows. Until then, we have to prevent having to move a 1619 // tabsheets between windows. Until then, we have to prevent having to move a
1620 // tabsheet between windows, e.g. no tearing off of tabs. 1620 // tabsheet between windows, e.g. no tearing off of tabs.
1621 int index = [tabStripController_ modelIndexForTabView:tabView]; 1621 int index = [tabStripController_ modelIndexForTabView:tabView];
1622 WebContents* contents = browser_->tab_strip_model()->GetWebContentsAt(index); 1622 WebContents* contents = browser_->tab_strip_model()->GetWebContentsAt(index);
1623 if (!contents) 1623 if (!contents)
1624 return NO; 1624 return NO;
1625
1626 // TODO(gbillock): Update to PopupManager.
1625 return !WebContentsModalDialogManager::FromWebContents(contents)-> 1627 return !WebContentsModalDialogManager::FromWebContents(contents)->
1626 IsDialogActive(); 1628 IsDialogActive();
1627 } 1629 }
1628 1630
1629 // TabStripControllerDelegate protocol. 1631 // TabStripControllerDelegate protocol.
1630 - (void)onActivateTabWithContents:(WebContents*)contents { 1632 - (void)onActivateTabWithContents:(WebContents*)contents {
1631 // Update various elements that are interested in knowing the current 1633 // Update various elements that are interested in knowing the current
1632 // WebContents. 1634 // WebContents.
1633 1635
1634 // Update all the UI bits. 1636 // Update all the UI bits.
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 2306
2305 - (BOOL)supportsBookmarkBar { 2307 - (BOOL)supportsBookmarkBar {
2306 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2308 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2307 } 2309 }
2308 2310
2309 - (BOOL)isTabbedWindow { 2311 - (BOOL)isTabbedWindow {
2310 return browser_->is_type_tabbed(); 2312 return browser_->is_type_tabbed();
2311 } 2313 }
2312 2314
2313 @end // @implementation BrowserWindowController(WindowType) 2315 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698