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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm

Issue 793003: Pick up a GTM roll and update the apis that changed in this roll.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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
« no previous file with comments | « DEPS ('k') | chrome/browser/cocoa/animatable_view.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" 5 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "base/gfx/rect.h" 10 #include "base/gfx/rect.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 PaintUpdatesNow(); 409 PaintUpdatesNow();
410 410
411 // Animate the frame change if the only change is that the height got smaller. 411 // Animate the frame change if the only change is that the height got smaller.
412 // Otherwise, resize immediately. 412 // Otherwise, resize immediately.
413 NSRect oldFrame = [popup_ frame]; 413 NSRect oldFrame = [popup_ frame];
414 if (r.size.height < oldFrame.size.height && 414 if (r.size.height < oldFrame.size.height &&
415 r.origin.x == oldFrame.origin.x && 415 r.origin.x == oldFrame.origin.x &&
416 r.size.width == oldFrame.size.width) { 416 r.size.width == oldFrame.size.width) {
417 [NSAnimationContext beginGrouping]; 417 [NSAnimationContext beginGrouping];
418 [[NSAnimationContext currentContext] 418 [[NSAnimationContext currentContext]
419 gtm_setDuration:kShrinkAnimationDuration]; 419 gtm_setDuration:kShrinkAnimationDuration
420 eventMask:NSLeftMouseDownMask];
420 [[popup_ animator] setFrame:r display:YES]; 421 [[popup_ animator] setFrame:r display:YES];
421 [NSAnimationContext endGrouping]; 422 [NSAnimationContext endGrouping];
422 } else { 423 } else {
423 [popup_ setFrame:r display:YES]; 424 [popup_ setFrame:r display:YES];
424 } 425 }
425 426
426 if (!IsOpen()) { 427 if (!IsOpen()) {
427 [[field_ window] addChildWindow:popup_ ordered:NSWindowAbove]; 428 [[field_ window] addChildWindow:popup_ ordered:NSWindowAbove];
428 } 429 }
429 } 430 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 yRadius:kPopupRoundingRadius]; 710 yRadius:kPopupRoundingRadius];
710 711
711 // Draw the matrix clipped to our border. 712 // Draw the matrix clipped to our border.
712 [NSGraphicsContext saveGraphicsState]; 713 [NSGraphicsContext saveGraphicsState];
713 [path addClip]; 714 [path addClip];
714 [super drawRect:rect]; 715 [super drawRect:rect];
715 [NSGraphicsContext restoreGraphicsState]; 716 [NSGraphicsContext restoreGraphicsState];
716 } 717 }
717 718
718 @end 719 @end
OLDNEW
« no previous file with comments | « DEPS ('k') | chrome/browser/cocoa/animatable_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698