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

Side by Side Diff: chrome/browser/cocoa/location_bar_view_mac.h

Issue 508010: [Mac] Fixes a bug where an ExtensionPopupController object's pointer was neve... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years 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) 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 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // Called to notify the Page Action that it should determine whether to be 193 // Called to notify the Page Action that it should determine whether to be
194 // visible or hidden. |contents| is the TabContents that is active, |url| 194 // visible or hidden. |contents| is the TabContents that is active, |url|
195 // is the current page URL. 195 // is the current page URL.
196 void UpdateVisibility(TabContents* contents, const GURL& url); 196 void UpdateVisibility(TabContents* contents, const GURL& url);
197 197
198 protected: 198 protected:
199 // For unit testing only. 199 // For unit testing only.
200 PageActionImageView() : owner_(NULL), 200 PageActionImageView() : owner_(NULL),
201 profile_(NULL), 201 profile_(NULL),
202 page_action_(NULL), 202 page_action_(NULL),
203 popup_controller_(nil),
203 tracker_(NULL), 204 tracker_(NULL),
204 current_tab_id_(-1), 205 current_tab_id_(-1),
205 preview_enabled_(false) {} 206 preview_enabled_(false) {}
206 207
207 private: 208 private:
208 // Overridden from NotificationObserver: 209 // Overridden from NotificationObserver:
209 virtual void Observe(NotificationType type, 210 virtual void Observe(NotificationType type,
210 const NotificationSource& source, 211 const NotificationSource& source,
211 const NotificationDetails& details); 212 const NotificationDetails& details);
212 void HidePopup(); 213 void HidePopup();
213 214
214 // The location bar view that owns us. 215 // The location bar view that owns us.
215 LocationBarViewMac* owner_; 216 LocationBarViewMac* owner_;
216 217
217 // The current profile (not owned by us). 218 // The current profile (not owned by us).
218 Profile* profile_; 219 Profile* profile_;
219 220
220 // The Page Action that this view represents. The Page Action is not owned 221 // The Page Action that this view represents. The Page Action is not owned
221 // by us, it resides in the extension of this particular profile. 222 // by us, it resides in the extension of this particular profile.
222 ExtensionAction* page_action_; 223 ExtensionAction* page_action_;
223 224
224 // A cache of images the Page Actions might need to show, mapped by path. 225 // A cache of images the Page Actions might need to show, mapped by path.
225 typedef std::map<std::string, SkBitmap> PageActionMap; 226 typedef std::map<std::string, SkBitmap> PageActionMap;
226 PageActionMap page_action_icons_; 227 PageActionMap page_action_icons_;
227 228
228 // The controller for the popup displayed if a page action has one. Weak. 229 // The controller for the popup displayed if a page action has one. Weak.
229 ExtensionPopupController* popupController_; 230 ExtensionPopupController* popup_controller_;
230 231
231 // The object that is waiting for the image loading to complete 232 // The object that is waiting for the image loading to complete
232 // asynchronously. 233 // asynchronously.
233 ImageLoadingTracker* tracker_; 234 ImageLoadingTracker* tracker_;
234 235
235 // The tab id we are currently showing the icon for. 236 // The tab id we are currently showing the icon for.
236 int current_tab_id_; 237 int current_tab_id_;
237 238
238 // The URL we are currently showing the icon for. 239 // The URL we are currently showing the icon for.
239 GURL current_url_; 240 GURL current_url_;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // Image used in drawing keyword hint. 322 // Image used in drawing keyword hint.
322 scoped_nsobject<NSImage> tab_button_image_; 323 scoped_nsobject<NSImage> tab_button_image_;
323 324
324 // The transition type to use for the navigation. 325 // The transition type to use for the navigation.
325 PageTransition::Type transition_; 326 PageTransition::Type transition_;
326 327
327 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 328 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
328 }; 329 };
329 330
330 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 331 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698