| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/download/download_item_controller.h" | 5 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" |
| 6 | 6 |
| 7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 363 } |
| 364 | 364 |
| 365 - (IBAction)dismissMaliciousDownload:(id)sender { | 365 - (IBAction)dismissMaliciousDownload:(id)sender { |
| 366 // ExperienceSampling: User dismissed the dangerous download. | 366 // ExperienceSampling: User dismissed the dangerous download. |
| 367 [self updateExperienceSamplingEvent:ExperienceSamplingEvent::kDeny]; | 367 [self updateExperienceSamplingEvent:ExperienceSamplingEvent::kDeny]; |
| 368 [self remove]; | 368 [self remove]; |
| 369 // WARNING: we are deleted at this point. | 369 // WARNING: we are deleted at this point. |
| 370 } | 370 } |
| 371 | 371 |
| 372 - (IBAction)showContextMenu:(id)sender { | 372 - (IBAction)showContextMenu:(id)sender { |
| 373 base::scoped_nsobject<DownloadShelfContextMenuController> menuController( | 373 [progressView_ showContextMenu]; |
| 374 [[DownloadShelfContextMenuController alloc] | |
| 375 initWithItemController:self | |
| 376 withDelegate:nil]); | |
| 377 [NSMenu popUpContextMenu:[menuController menu] | |
| 378 withEvent:[NSApp currentEvent] | |
| 379 forView:[self view]]; | |
| 380 } | 374 } |
| 381 | 375 |
| 382 @end | 376 @end |
| OLD | NEW |