OLD | NEW |
1 // Copyright 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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #import "chrome/browser/ui/cocoa/download/download_shelf_context_menu_controller
.h" | 22 #import "chrome/browser/ui/cocoa/download/download_shelf_context_menu_controller
.h" |
23 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" | 23 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" |
24 #import "chrome/browser/ui/cocoa/themed_window.h" | 24 #import "chrome/browser/ui/cocoa/themed_window.h" |
25 #import "chrome/browser/ui/cocoa/ui_localizer.h" | 25 #import "chrome/browser/ui/cocoa/ui_localizer.h" |
26 #include "content/public/browser/download_item.h" | 26 #include "content/public/browser/download_item.h" |
27 #include "content/public/browser/page_navigator.h" | 27 #include "content/public/browser/page_navigator.h" |
28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
29 #include "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutT
weaker.h" | 29 #include "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutT
weaker.h" |
30 #include "ui/base/l10n/l10n_util_mac.h" | 30 #include "ui/base/l10n/l10n_util_mac.h" |
31 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
32 #include "ui/gfx/text_elider.h" | |
33 #include "ui/gfx/font.h" | 32 #include "ui/gfx/font.h" |
34 #include "ui/gfx/image/image.h" | 33 #include "ui/gfx/image/image.h" |
| 34 #include "ui/gfx/text_elider.h" |
35 | 35 |
36 using content::DownloadItem; | 36 using content::DownloadItem; |
37 using extensions::ExperienceSamplingEvent; | 37 using extensions::ExperienceSamplingEvent; |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 // NOTE: Mac currently doesn't use this like Windows does. Mac uses this to | 41 // NOTE: Mac currently doesn't use this like Windows does. Mac uses this to |
42 // control the min size on the dangerous download text. TVL sent a query off to | 42 // control the min size on the dangerous download text. TVL sent a query off to |
43 // UX to fully spec all the the behaviors of download items and truncations | 43 // UX to fully spec all the the behaviors of download items and truncations |
44 // rules so all platforms can get inline in the future. | 44 // rules so all platforms can get inline in the future. |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 [progressView_ showContextMenu]; | 373 [progressView_ showContextMenu]; |
374 } | 374 } |
375 | 375 |
376 @end | 376 @end |
OLD | NEW |