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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_item_controller.mm

Issue 6766004: Create a ProfileDependencyManager to order ProfileKeyedService destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix improper usage of static_cast<> in existing mac code. Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/download/download_item_controller.h" 5 #import "chrome/browser/ui/cocoa/download/download_item_controller.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 [dangerousDownloadView_ setHidden:NO]; 317 [dangerousDownloadView_ setHidden:NO];
318 } 318 }
319 // NOTE: Do not relayout the shelf, as this could get called during initial 319 // NOTE: Do not relayout the shelf, as this could get called during initial
320 // setup of the the item, so the localized text and sizing might not have 320 // setup of the the item, so the localized text and sizing might not have
321 // happened yet. 321 // happened yet.
322 } 322 }
323 323
324 // Called after the current theme has changed. 324 // Called after the current theme has changed.
325 - (void)themeDidChangeNotification:(NSNotification*)aNotification { 325 - (void)themeDidChangeNotification:(NSNotification*)aNotification {
326 ui::ThemeProvider* themeProvider = 326 ui::ThemeProvider* themeProvider =
327 static_cast<ui::ThemeProvider*>([[aNotification object] pointerValue]); 327 static_cast<ThemeService*>([[aNotification object] pointerValue]);
328 [self updateTheme:themeProvider]; 328 [self updateTheme:themeProvider];
329 } 329 }
330 330
331 // Adapt appearance to the current theme. Called after theme changes and before 331 // Adapt appearance to the current theme. Called after theme changes and before
332 // this is shown for the first time. 332 // this is shown for the first time.
333 - (void)updateTheme:(ui::ThemeProvider*)themeProvider { 333 - (void)updateTheme:(ui::ThemeProvider*)themeProvider {
334 NSColor* color = 334 NSColor* color =
335 themeProvider->GetNSColor(ThemeService::COLOR_TAB_TEXT, true); 335 themeProvider->GetNSColor(ThemeService::COLOR_TAB_TEXT, true);
336 [dangerousDownloadLabel_ setTextColor:color]; 336 [dangerousDownloadLabel_ setTextColor:color];
337 } 337 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 [sender setTitle:l10n_util::GetNSStringWithFixup( 409 [sender setTitle:l10n_util::GetNSStringWithFixup(
410 IDS_DOWNLOAD_MENU_PAUSE_ITEM)]; 410 IDS_DOWNLOAD_MENU_PAUSE_ITEM)];
411 } else { 411 } else {
412 [sender setTitle:l10n_util::GetNSStringWithFixup( 412 [sender setTitle:l10n_util::GetNSStringWithFixup(
413 IDS_DOWNLOAD_MENU_RESUME_ITEM)]; 413 IDS_DOWNLOAD_MENU_RESUME_ITEM)];
414 } 414 }
415 menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::TOGGLE_PAUSE); 415 menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::TOGGLE_PAUSE);
416 } 416 }
417 417
418 @end 418 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.mm ('k') | chrome/browser/ui/gtk/gtk_theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698