OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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/fullscreen/fullscreen_controller.h" | 64 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" |
65 #include "chrome/browser/ui/omnibox/location_bar.h" | 65 #include "chrome/browser/ui/omnibox/location_bar.h" |
66 #include "chrome/browser/ui/tabs/dock_info.h" | 66 #include "chrome/browser/ui/tabs/dock_info.h" |
67 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 67 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
68 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" | 68 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" |
69 #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" | 70 #include "chrome/browser/ui/window_sizer/window_sizer.h" |
72 #include "chrome/common/chrome_switches.h" | 71 #include "chrome/common/chrome_switches.h" |
73 #include "chrome/common/url_constants.h" | 72 #include "chrome/common/url_constants.h" |
| 73 #include "components/web_modal/web_contents_modal_dialog_manager.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/chromium_strings.h" | 77 #include "grit/chromium_strings.h" |
78 #include "grit/generated_resources.h" | 78 #include "grit/generated_resources.h" |
79 #include "grit/locale_settings.h" | 79 #include "grit/locale_settings.h" |
80 #include "ui/base/l10n/l10n_util.h" | 80 #include "ui/base/l10n/l10n_util.h" |
81 #include "ui/base/l10n/l10n_util_mac.h" | 81 #include "ui/base/l10n/l10n_util_mac.h" |
82 #include "ui/gfx/mac/scoped_ns_disable_screen_updates.h" | 82 #include "ui/gfx/mac/scoped_ns_disable_screen_updates.h" |
83 | 83 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // any shrink whether we're both zoomed and have previously grown -- if so, we | 156 // any shrink whether we're both zoomed and have previously grown -- if so, we |
157 // set a flag, and constrain any resize by the allowed amounts. On further | 157 // set a flag, and constrain any resize by the allowed amounts. On further |
158 // shrinks, we check the flag (since the size/position of the window will no | 158 // shrinks, we check the flag (since the size/position of the window will no |
159 // longer indicate that the window is shrinking from an apparent zoomed state) | 159 // longer indicate that the window is shrinking from an apparent zoomed state) |
160 // and if it's set we continue to constrain the resize. | 160 // and if it's set we continue to constrain the resize. |
161 | 161 |
162 using content::OpenURLParams; | 162 using content::OpenURLParams; |
163 using content::Referrer; | 163 using content::Referrer; |
164 using content::RenderWidgetHostView; | 164 using content::RenderWidgetHostView; |
165 using content::WebContents; | 165 using content::WebContents; |
| 166 using web_modal::WebContentsModalDialogManager; |
166 | 167 |
167 @interface NSWindow (NSPrivateApis) | 168 @interface NSWindow (NSPrivateApis) |
168 // Note: These functions are private, use -[NSObject respondsToSelector:] | 169 // Note: These functions are private, use -[NSObject respondsToSelector:] |
169 // before calling them. | 170 // before calling them. |
170 | 171 |
171 - (void)setBottomCornerRounded:(BOOL)rounded; | 172 - (void)setBottomCornerRounded:(BOOL)rounded; |
172 | 173 |
173 - (NSRect)_growBoxRect; | 174 - (NSRect)_growBoxRect; |
174 | 175 |
175 @end | 176 @end |
(...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 | 2234 |
2234 - (BOOL)supportsBookmarkBar { | 2235 - (BOOL)supportsBookmarkBar { |
2235 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2236 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2236 } | 2237 } |
2237 | 2238 |
2238 - (BOOL)isTabbedWindow { | 2239 - (BOOL)isTabbedWindow { |
2239 return browser_->is_type_tabbed(); | 2240 return browser_->is_type_tabbed(); |
2240 } | 2241 } |
2241 | 2242 |
2242 @end // @implementation BrowserWindowController(WindowType) | 2243 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |