OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 // Same as |x| above. | 1849 // Same as |x| above. |
1850 CGFloat y = 0; | 1850 CGFloat y = 0; |
1851 if (NSMaxY(target) < NSMaxY(source)) | 1851 if (NSMaxY(target) < NSMaxY(source)) |
1852 y = NSMaxY(source) - NSMaxY(target); | 1852 y = NSMaxY(source) - NSMaxY(target); |
1853 else if (NSMinY(source) < NSMinY(target)) | 1853 else if (NSMinY(source) < NSMinY(target)) |
1854 y = NSMinY(source) - NSMinY(target); | 1854 y = NSMinY(source) - NSMinY(target); |
1855 | 1855 |
1856 return NSMakeSize(x, y); | 1856 return NSMakeSize(x, y); |
1857 } | 1857 } |
1858 | 1858 |
| 1859 // (Private/TestingAPI) |
| 1860 - (FullscreenExitBubbleController*)fullscreenExitBubbleController { |
| 1861 return fullscreenExitBubbleController_.get(); |
| 1862 } |
| 1863 |
1859 - (void)showInstant:(TabContents*)previewContents { | 1864 - (void)showInstant:(TabContents*)previewContents { |
1860 [previewableContentsController_ showPreview:previewContents]; | 1865 [previewableContentsController_ showPreview:previewContents]; |
1861 [self updateBookmarkBarVisibilityWithAnimation:NO]; | 1866 [self updateBookmarkBarVisibilityWithAnimation:NO]; |
1862 } | 1867 } |
1863 | 1868 |
1864 - (void)hideInstant { | 1869 - (void)hideInstant { |
1865 // TODO(rohitrao): Revisit whether or not this method should be called when | 1870 // TODO(rohitrao): Revisit whether or not this method should be called when |
1866 // instant isn't showing. | 1871 // instant isn't showing. |
1867 if (![previewableContentsController_ isShowingPreview]) | 1872 if (![previewableContentsController_ isShowingPreview]) |
1868 return; | 1873 return; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 | 2180 |
2176 - (BOOL)supportsBookmarkBar { | 2181 - (BOOL)supportsBookmarkBar { |
2177 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2182 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2178 } | 2183 } |
2179 | 2184 |
2180 - (BOOL)isTabbedWindow { | 2185 - (BOOL)isTabbedWindow { |
2181 return browser_->is_type_tabbed(); | 2186 return browser_->is_type_tabbed(); |
2182 } | 2187 } |
2183 | 2188 |
2184 @end // @implementation BrowserWindowController(WindowType) | 2189 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |