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

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

Issue 2010002: [Mac] Fixes janky animations in the omnibox popup.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « no previous file | chrome/browser/autocomplete/autocomplete_popup_view_mac.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_MAC_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_MAC_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 static NSMutableAttributedString* ElideString( 99 static NSMutableAttributedString* ElideString(
100 NSMutableAttributedString* aString, 100 NSMutableAttributedString* aString,
101 const std::wstring originalString, 101 const std::wstring originalString,
102 const gfx::Font& font, 102 const gfx::Font& font,
103 const float cellWidth); 103 const float cellWidth);
104 104
105 private: 105 private:
106 // Create the popup_ instance if needed. 106 // Create the popup_ instance if needed.
107 void CreatePopupIfNeeded(); 107 void CreatePopupIfNeeded();
108 108
109 // Sets the popup frame, animating to the new frame if the popup is shrinking,
110 // setting the frame immediately otherwise. Does nothing if the popup is
111 // already animating to the given frame.
112 void SetPopupFrame(const NSRect frame);
113
109 scoped_ptr<AutocompletePopupModel> model_; 114 scoped_ptr<AutocompletePopupModel> model_;
110 AutocompleteEditViewMac* edit_view_; 115 AutocompleteEditViewMac* edit_view_;
111 NSTextField* field_; // owned by tab controller 116 NSTextField* field_; // owned by tab controller
112 117
113 // Child window containing a matrix which implements the popup. 118 // Child window containing a matrix which implements the popup.
114 scoped_nsobject<NSWindow> popup_; 119 scoped_nsobject<NSWindow> popup_;
120 NSRect targetPopupFrame_;
115 121
116 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupViewMac); 122 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupViewMac);
117 }; 123 };
118 124
119 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_MAC_H_ 125 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_popup_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698