OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 // instant isn't showing. | 1913 // instant isn't showing. |
1914 if (![previewableContentsController_ isShowingPreview]) | 1914 if (![previewableContentsController_ isShowingPreview]) |
1915 return; | 1915 return; |
1916 | 1916 |
1917 [previewableContentsController_ hidePreview]; | 1917 [previewableContentsController_ hidePreview]; |
1918 [self updateBookmarkBarVisibilityWithAnimation:NO]; | 1918 [self updateBookmarkBarVisibilityWithAnimation:NO]; |
1919 } | 1919 } |
1920 | 1920 |
1921 - (void)commitInstant { | 1921 - (void)commitInstant { |
1922 InstantController* instant = browser_->instant_controller()->instant(); | 1922 InstantController* instant = browser_->instant_controller()->instant(); |
1923 if (instant) | 1923 if (instant && instant->IsCurrent()) |
1924 instant->CommitIfCurrent(); | 1924 instant->CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST); |
1925 } | 1925 } |
1926 | 1926 |
1927 | 1927 |
1928 - (NSRect)instantFrame { | 1928 - (NSRect)instantFrame { |
1929 // The view's bounds are in its own coordinate system. Convert that to the | 1929 // The view's bounds are in its own coordinate system. Convert that to the |
1930 // window base coordinate system, then translate it into the screen's | 1930 // window base coordinate system, then translate it into the screen's |
1931 // coordinate system. | 1931 // coordinate system. |
1932 NSView* view = [previewableContentsController_ view]; | 1932 NSView* view = [previewableContentsController_ view]; |
1933 if (!view) | 1933 if (!view) |
1934 return NSZeroRect; | 1934 return NSZeroRect; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2202 | 2202 |
2203 - (BOOL)supportsBookmarkBar { | 2203 - (BOOL)supportsBookmarkBar { |
2204 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2204 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2205 } | 2205 } |
2206 | 2206 |
2207 - (BOOL)isTabbedWindow { | 2207 - (BOOL)isTabbedWindow { |
2208 return browser_->is_type_tabbed(); | 2208 return browser_->is_type_tabbed(); |
2209 } | 2209 } |
2210 | 2210 |
2211 @end // @implementation BrowserWindowController(WindowType) | 2211 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |