| 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 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 // Same as |x| above. | 1875 // Same as |x| above. |
| 1876 CGFloat y = 0; | 1876 CGFloat y = 0; |
| 1877 if (NSMaxY(target) < NSMaxY(source)) | 1877 if (NSMaxY(target) < NSMaxY(source)) |
| 1878 y = NSMaxY(source) - NSMaxY(target); | 1878 y = NSMaxY(source) - NSMaxY(target); |
| 1879 else if (NSMinY(source) < NSMinY(target)) | 1879 else if (NSMinY(source) < NSMinY(target)) |
| 1880 y = NSMinY(source) - NSMinY(target); | 1880 y = NSMinY(source) - NSMinY(target); |
| 1881 | 1881 |
| 1882 return NSMakeSize(x, y); | 1882 return NSMakeSize(x, y); |
| 1883 } | 1883 } |
| 1884 | 1884 |
| 1885 // (Private/TestingAPI) | |
| 1886 - (ExclusiveAccessBubbleWindowController*) | |
| 1887 exclusiveAccessBubbleWindowController { | |
| 1888 return exclusiveAccessBubbleWindowController_.get(); | |
| 1889 } | |
| 1890 | |
| 1891 - (NSRect)omniboxPopupAnchorRect { | 1885 - (NSRect)omniboxPopupAnchorRect { |
| 1892 // Start with toolbar rect. | 1886 // Start with toolbar rect. |
| 1893 NSView* toolbarView = [toolbarController_ view]; | 1887 NSView* toolbarView = [toolbarController_ view]; |
| 1894 NSRect anchorRect = [toolbarView frame]; | 1888 NSRect anchorRect = [toolbarView frame]; |
| 1895 | 1889 |
| 1896 // Adjust to account for height and possible bookmark bar. Compress by 1 | 1890 // Adjust to account for height and possible bookmark bar. Compress by 1 |
| 1897 // to account for the separator. | 1891 // to account for the separator. |
| 1898 anchorRect.origin.y = | 1892 anchorRect.origin.y = |
| 1899 NSMaxY(anchorRect) - [toolbarController_ desiredHeightForCompression:1]; | 1893 NSMaxY(anchorRect) - [toolbarController_ desiredHeightForCompression:1]; |
| 1900 | 1894 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 | 2102 |
| 2109 - (BOOL)supportsBookmarkBar { | 2103 - (BOOL)supportsBookmarkBar { |
| 2110 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2104 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2111 } | 2105 } |
| 2112 | 2106 |
| 2113 - (BOOL)isTabbedWindow { | 2107 - (BOOL)isTabbedWindow { |
| 2114 return browser_->is_type_tabbed(); | 2108 return browser_->is_type_tabbed(); |
| 2115 } | 2109 } |
| 2116 | 2110 |
| 2117 @end // @implementation BrowserWindowController(WindowType) | 2111 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |