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

Side by Side Diff: chrome/browser/ui/views/location_bar/page_action_image_view.h

Issue 10806058: Move icon fallbacks into ExtensionAction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the icon cache inside ExtensionAction. 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // The location bar view that owns us. 96 // The location bar view that owns us.
97 LocationBarView* owner_; 97 LocationBarView* owner_;
98 98
99 // The PageAction that this view represents. The PageAction is not owned by 99 // The PageAction that this view represents. The PageAction is not owned by
100 // us, it resides in the extension of this particular profile. 100 // us, it resides in the extension of this particular profile.
101 ExtensionAction* page_action_; 101 ExtensionAction* page_action_;
102 102
103 // The corresponding browser. 103 // The corresponding browser.
104 Browser* browser_; 104 Browser* browser_;
105 105
106 // A cache of bitmaps the page actions might need to show, mapped by path.
107 typedef std::map<std::string, SkBitmap> PageActionMap;
108 PageActionMap page_action_icons_;
109
110 // The object that is waiting for the image loading to complete 106 // The object that is waiting for the image loading to complete
111 // asynchronously. 107 // asynchronously.
112 ImageLoadingTracker tracker_; 108 ImageLoadingTracker tracker_;
113 109
114 // The tab id we are currently showing the icon for. 110 // The tab id we are currently showing the icon for.
115 int current_tab_id_; 111 int current_tab_id_;
116 112
117 // The URL we are currently showing the icon for. 113 // The URL we are currently showing the icon for.
118 GURL current_url_; 114 GURL current_url_;
119 115
(...skipping 16 matching lines...) Expand all
136 scoped_ptr<views::MenuRunner> menu_runner_; 132 scoped_ptr<views::MenuRunner> menu_runner_;
137 133
138 // Fade-in animation for the icon with observer scoped to this. 134 // Fade-in animation for the icon with observer scoped to this.
139 ExtensionAction::IconAnimation::ScopedObserver 135 ExtensionAction::IconAnimation::ScopedObserver
140 scoped_icon_animation_observer_; 136 scoped_icon_animation_observer_;
141 137
142 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView); 138 DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView);
143 }; 139 };
144 140
145 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_ 141 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_PAGE_ACTION_IMAGE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698