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

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

Issue 10836031: Remove Instant v1 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update history, title, favicon Created 8 years, 4 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 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698