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

Side by Side Diff: chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc

Issue 10914244: Remove support for page_action.icons, and the legacy code surrounding it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constants removed Created 8 years, 3 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 #include "chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 default: 215 default:
216 NOTREACHED(); 216 NOTREACHED();
217 break; 217 break;
218 } 218 }
219 } 219 }
220 220
221 // ImageLoadingTracker::Observer implementation. 221 // ImageLoadingTracker::Observer implementation.
222 void OnImageLoaded(const gfx::Image& image, 222 void OnImageLoaded(const gfx::Image& image,
223 const std::string& extension_id, 223 const std::string& extension_id,
224 int index) OVERRIDE { 224 int index) OVERRIDE {
225 extension_->browser_action()->CacheIcon( 225 extension_->browser_action()->CacheIcon(image);
226 extension_->browser_action()->default_icon_path(), image);
227 UpdateState(); 226 UpdateState();
228 } 227 }
229 228
230 // Updates the button based on the latest state from the associated 229 // Updates the button based on the latest state from the associated
231 // browser action. 230 // browser action.
232 void UpdateState() { 231 void UpdateState() {
233 int tab_id = toolbar_->GetCurrentTabId(); 232 int tab_id = toolbar_->GetCurrentTabId();
234 if (tab_id < 0) 233 if (tab_id < 0)
235 return; 234 return;
236 235
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 1093
1095 menu->PopupAsContext(gfx::Point(event->x_root, event->y_root), 1094 menu->PopupAsContext(gfx::Point(event->x_root, event->y_root),
1096 event->time); 1095 event->time);
1097 return TRUE; 1096 return TRUE;
1098 } 1097 }
1099 1098
1100 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) { 1099 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) {
1101 if (!resize_animation_.is_animating()) 1100 if (!resize_animation_.is_animating())
1102 UpdateChevronVisibility(); 1101 UpdateChevronVisibility();
1103 } 1102 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm ('k') | chrome/browser/ui/gtk/location_bar_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698