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

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

Issue 12213093: Remove ImageLoadingTracker class (Closed) Base URL: https://git.chromium.org/chromium/src.git@Issue_163929
Patch Set: Fix merge conflict Created 7 years, 10 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 : owner_(owner), 52 : owner_(owner),
53 browser_action_([[owner cell] extensionAction]), 53 browser_action_([[owner cell] extensionAction]),
54 icon_factory_(profile, extension, browser_action_, this) { 54 icon_factory_(profile, extension, browser_action_, this) {
55 registrar_.Add( 55 registrar_.Add(
56 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED, 56 this, chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED,
57 content::Source<ExtensionAction>(browser_action_)); 57 content::Source<ExtensionAction>(browser_action_));
58 } 58 }
59 59
60 virtual ~ExtensionActionIconFactoryBridge() {} 60 virtual ~ExtensionActionIconFactoryBridge() {}
61 61
62 // ImageLoadingTracker::Observer implementation. 62 // ExtensionActionIconFactory::Observer implementation.
63 void OnIconUpdated() OVERRIDE { 63 void OnIconUpdated() OVERRIDE {
64 [owner_ updateState]; 64 [owner_ updateState];
65 } 65 }
66 66
67 // Overridden from content::NotificationObserver. 67 // Overridden from content::NotificationObserver.
68 void Observe(int type, 68 void Observe(int type,
69 const content::NotificationSource& source, 69 const content::NotificationSource& source,
70 const content::NotificationDetails& details) { 70 const content::NotificationDetails& details) {
71 if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED) 71 if (type == chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_UPDATED)
72 [owner_ updateState]; 72 [owner_ updateState];
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 operation:NSCompositeSourceOver 328 operation:NSCompositeSourceOver
329 fraction:enabled ? 1.0 : 0.4 329 fraction:enabled ? 1.0 : 0.4
330 respectFlipped:YES 330 respectFlipped:YES
331 hints:nil]; 331 hints:nil];
332 332
333 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset; 333 cellFrame.origin.y += kBrowserActionBadgeOriginYOffset;
334 [self drawBadgeWithinFrame:cellFrame]; 334 [self drawBadgeWithinFrame:cellFrame];
335 } 335 }
336 336
337 @end 337 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_icon_loader_impl.h ('k') | chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698