| OLD | NEW |
| 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/dock_icon.h" | 5 #import "chrome/browser/ui/cocoa/dock_icon.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 7 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 8 #include "base/memory/scoped_nsobject.h" | 9 #include "base/memory/scoped_nsobject.h" |
| 9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 10 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 11 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 11 | 12 |
| 12 using content::BrowserThread; | 13 using content::BrowserThread; |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // The fraction of the size of the dock icon that the badge is. | 17 // The fraction of the size of the dock icon that the badge is. |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 259 |
| 259 - (void)setProgress:(float)progress { | 260 - (void)setProgress:(float)progress { |
| 260 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 261 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 261 NSDockTile* dockTile = [[NSApplication sharedApplication] dockTile]; | 262 NSDockTile* dockTile = [[NSApplication sharedApplication] dockTile]; |
| 262 DockTileView* dockTileView = (DockTileView*)([dockTile contentView]); | 263 DockTileView* dockTileView = (DockTileView*)([dockTile contentView]); |
| 263 | 264 |
| 264 [dockTileView setProgress:progress]; | 265 [dockTileView setProgress:progress]; |
| 265 } | 266 } |
| 266 | 267 |
| 267 @end | 268 @end |
| OLD | NEW |