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

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

Issue 11633052: Rename platform-independent ConstrainedWindow types to WebContentsModalDialog types (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use gtk_widget_get_toplevel for GetNativeWindow Created 7 years, 11 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" 54 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h"
55 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" 55 #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
56 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h" 56 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h"
57 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h" 57 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
58 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 58 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
59 #import "chrome/browser/ui/cocoa/tabpose_window.h" 59 #import "chrome/browser/ui/cocoa/tabpose_window.h"
60 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 60 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
61 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" 61 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
62 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 62 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
63 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 63 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
64 #include "chrome/browser/ui/constrained_window_tab_helper.h"
65 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" 64 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
66 #include "chrome/browser/ui/omnibox/location_bar.h" 65 #include "chrome/browser/ui/omnibox/location_bar.h"
67 #include "chrome/browser/ui/tabs/dock_info.h" 66 #include "chrome/browser/ui/tabs/dock_info.h"
68 #include "chrome/browser/ui/tabs/tab_strip_model.h" 67 #include "chrome/browser/ui/tabs/tab_strip_model.h"
69 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" 68 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
70 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" 69 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
70 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
71 #include "chrome/browser/ui/window_sizer/window_sizer.h" 71 #include "chrome/browser/ui/window_sizer/window_sizer.h"
72 #include "chrome/common/chrome_switches.h" 72 #include "chrome/common/chrome_switches.h"
73 #include "chrome/common/url_constants.h" 73 #include "chrome/common/url_constants.h"
74 #include "content/public/browser/render_view_host.h" 74 #include "content/public/browser/render_view_host.h"
75 #include "content/public/browser/render_widget_host_view.h" 75 #include "content/public/browser/render_widget_host_view.h"
76 #include "content/public/browser/web_contents.h" 76 #include "content/public/browser/web_contents.h"
77 #include "grit/generated_resources.h" 77 #include "grit/generated_resources.h"
78 #include "grit/locale_settings.h" 78 #include "grit/locale_settings.h"
79 #include "ui/base/l10n/l10n_util.h" 79 #include "ui/base/l10n/l10n_util.h"
80 #include "ui/base/l10n/l10n_util_mac.h" 80 #include "ui/base/l10n/l10n_util_mac.h"
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 } 1502 }
1503 1503
1504 - (BOOL)isTabDraggable:(NSView*)tabView { 1504 - (BOOL)isTabDraggable:(NSView*)tabView {
1505 // TODO(avi, thakis): ConstrainedWindowSheetController has no api to move 1505 // TODO(avi, thakis): ConstrainedWindowSheetController has no api to move
1506 // tabsheets between windows. Until then, we have to prevent having to move a 1506 // tabsheets between windows. Until then, we have to prevent having to move a
1507 // tabsheet between windows, e.g. no tearing off of tabs. 1507 // tabsheet between windows, e.g. no tearing off of tabs.
1508 int index = [tabStripController_ modelIndexForTabView:tabView]; 1508 int index = [tabStripController_ modelIndexForTabView:tabView];
1509 WebContents* contents = chrome::GetWebContentsAt(browser_.get(), index); 1509 WebContents* contents = chrome::GetWebContentsAt(browser_.get(), index);
1510 if (!contents) 1510 if (!contents)
1511 return NO; 1511 return NO;
1512 return ConstrainedWindowTabHelper::FromWebContents(contents)-> 1512 return WebContentsModalDialogManager::FromWebContents(contents)->
1513 dialog_count() == 0; 1513 dialog_count() == 0;
1514 } 1514 }
1515 1515
1516 // TabStripControllerDelegate protocol. 1516 // TabStripControllerDelegate protocol.
1517 - (void)onActivateTabWithContents:(WebContents*)contents { 1517 - (void)onActivateTabWithContents:(WebContents*)contents {
1518 // Update various elements that are interested in knowing the current 1518 // Update various elements that are interested in knowing the current
1519 // WebContents. 1519 // WebContents.
1520 1520
1521 // Update all the UI bits. 1521 // Update all the UI bits.
1522 windowShim_->UpdateTitleBar(); 1522 windowShim_->UpdateTitleBar();
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 2167
2168 - (BOOL)supportsBookmarkBar { 2168 - (BOOL)supportsBookmarkBar {
2169 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2169 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2170 } 2170 }
2171 2171
2172 - (BOOL)isTabbedWindow { 2172 - (BOOL)isTabbedWindow {
2173 return browser_->is_type_tabbed(); 2173 return browser_->is_type_tabbed();
2174 } 2174 }
2175 2175
2176 @end // @implementation BrowserWindowController(WindowType) 2176 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_contents.cc ('k') | chrome/browser/ui/cocoa/constrained_web_dialog_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698