summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/download/download_item_controller.h
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 02:49:12 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-06 02:49:12 +0000
commit9ffabfb5e3e3e3de923d60a4ad4d1337b6895345 (patch)
tree275a04d47b5af436751e52935d37d280817c28ee /chrome/browser/ui/cocoa/download/download_item_controller.h
parentd5fbd900ab784c2fcc73e62b5496106487da2909 (diff)
downloadchromium_src-9ffabfb5e3e3e3de923d60a4ad4d1337b6895345.zip
chromium_src-9ffabfb5e3e3e3de923d60a4ad4d1337b6895345.tar.gz
chromium_src-9ffabfb5e3e3e3de923d60a4ad4d1337b6895345.tar.bz2
Refactor dangerous download warning text generation into DownloadItemModel.
Previously, we had multiple copies of the logic for generating warning text for a dangerous or malicious download. Move all of these into DownloadModel. As an additional benefit, we no longer require UI code to interpret DownloadItem::GetDangerType(). BUG=116551 TEST=Start a dangerous, malicious, and extension download. Check whether the warning text is correct, and any embedded filename is elided if necessary. Review URL: http://codereview.chromium.org/9569011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/download/download_item_controller.h')
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_controller.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.h b/chrome/browser/ui/cocoa/download/download_item_controller.h
index d06cb14..1a64dcc 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller.h
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -20,6 +20,10 @@ namespace content {
class DownloadItem;
}
+namespace gfx {
+class Font;
+}
+
// A controller class that manages one download item.
@interface DownloadItemController : NSViewController {
@@ -56,6 +60,9 @@ class DownloadItem;
// The time at which this view was created.
base::Time creationTime_;
+ // Default font to use for text metrics.
+ scoped_ptr<gfx::Font> font_;
+
// The state of this item.
enum DownoadItemState {
kNormal,