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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_action_button.mm

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 #import "chrome/browser/ui/cocoa/extensions/browser_action_button.h" 5 #import "chrome/browser/ui/cocoa/extensions/browser_action_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, 61 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
62 content::Source<ExtensionAction>(browser_action_)); 62 content::Source<ExtensionAction>(browser_action_));
63 } 63 }
64 64
65 ~ExtensionImageTrackerBridge() {} 65 ~ExtensionImageTrackerBridge() {}
66 66
67 // ImageLoadingTracker::Observer implementation. 67 // ImageLoadingTracker::Observer implementation.
68 void OnImageLoaded(const gfx::Image& image, 68 void OnImageLoaded(const gfx::Image& image,
69 const std::string& extension_id, 69 const std::string& extension_id,
70 int index) OVERRIDE { 70 int index) OVERRIDE {
71 browser_action_->CacheIcon(browser_action_->default_icon_path(), image); 71 browser_action_->CacheIcon(image);
72 [owner_ updateState]; 72 [owner_ updateState];
73 } 73 }
74 74
75 // Overridden from content::NotificationObserver. 75 // Overridden from content::NotificationObserver.
76 void Observe(int type, 76 void Observe(int type,
77 const content::NotificationSource& source, 77 const content::NotificationSource& source,
78 const content::NotificationDetails& details) { 78 const content::NotificationDetails& details) {
79 if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED) 79 if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED)
80 [owner_ updateState]; 80 [owner_ updateState];
81 else 81 else
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 operation:NSCompositeSourceOver 321 operation:NSCompositeSourceOver
322 fraction:1.0 322 fraction:1.0
323 respectFlipped:YES 323 respectFlipped:YES
324 hints:nil]; 324 hints:nil];
325 325
326 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; 326 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset;
327 [self drawBadgeWithinFrame:cellFrame]; 327 [self drawBadgeWithinFrame:cellFrame];
328 } 328 }
329 329
330 @end 330 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698