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

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

Issue 10732002: Upstream rewrite of Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extreme nits. Created 8 years, 5 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 (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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 // instant isn't showing. 1911 // instant isn't showing.
1912 if (![previewableContentsController_ isShowingPreview]) 1912 if (![previewableContentsController_ isShowingPreview])
1913 return; 1913 return;
1914 1914
1915 [previewableContentsController_ hidePreview]; 1915 [previewableContentsController_ hidePreview];
1916 [self updateBookmarkBarVisibilityWithAnimation:NO]; 1916 [self updateBookmarkBarVisibilityWithAnimation:NO];
1917 } 1917 }
1918 1918
1919 - (void)commitInstant { 1919 - (void)commitInstant {
1920 InstantController* instant = browser_->instant_controller()->instant(); 1920 InstantController* instant = browser_->instant_controller()->instant();
1921 if (instant) 1921 if (instant && instant->IsCurrent())
1922 instant->CommitIfCurrent(); 1922 instant->CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
1923 } 1923 }
1924 1924
1925 1925
1926 - (NSRect)instantFrame { 1926 - (NSRect)instantFrame {
1927 // The view's bounds are in its own coordinate system. Convert that to the 1927 // The view's bounds are in its own coordinate system. Convert that to the
1928 // window base coordinate system, then translate it into the screen's 1928 // window base coordinate system, then translate it into the screen's
1929 // coordinate system. 1929 // coordinate system.
1930 NSView* view = [previewableContentsController_ view]; 1930 NSView* view = [previewableContentsController_ view];
1931 if (!view) 1931 if (!view)
1932 return NSZeroRect; 1932 return NSZeroRect;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.cc ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698