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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view.h

Issue 402293002: Experience sampling instrumentation for dangerous downloads warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sampling-api
Patch Set: Add missing constants to Cocoa version Created 6 years, 4 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
OLDNEW
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 // A ChromeView that implements one download on the Download shelf. 5 // A ChromeView that implements one download on the Download shelf.
6 // Each DownloadItemView contains an application icon, a text label 6 // Each DownloadItemView contains an application icon, a text label
7 // indicating the download's file name, a text label indicating the 7 // indicating the download's file name, a text label indicating the
8 // download's status (such as the number of bytes downloaded so far) 8 // download's status (such as the number of bytes downloaded so far)
9 // and a button for canceling an in progress download, or opening 9 // and a button for canceling an in progress download, or opening
10 // the completed download. 10 // the completed download.
(...skipping 20 matching lines...) Expand all
31 #include "content/public/browser/download_manager.h" 31 #include "content/public/browser/download_manager.h"
32 #include "ui/gfx/animation/animation_delegate.h" 32 #include "ui/gfx/animation/animation_delegate.h"
33 #include "ui/gfx/font_list.h" 33 #include "ui/gfx/font_list.h"
34 #include "ui/views/context_menu_controller.h" 34 #include "ui/views/context_menu_controller.h"
35 #include "ui/views/controls/button/button.h" 35 #include "ui/views/controls/button/button.h"
36 #include "ui/views/view.h" 36 #include "ui/views/view.h"
37 37
38 class DownloadShelfView; 38 class DownloadShelfView;
39 class DownloadShelfContextMenuView; 39 class DownloadShelfContextMenuView;
40 40
41 namespace extensions {
42 class ExperienceSamplingEvent;
43 }
44
41 namespace gfx { 45 namespace gfx {
42 class Image; 46 class Image;
43 class ImageSkia; 47 class ImageSkia;
44 class SlideAnimation; 48 class SlideAnimation;
45 } 49 }
46 50
47 namespace views { 51 namespace views {
48 class Label; 52 class Label;
49 class LabelButton; 53 class LabelButton;
50 } 54 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 scoped_ptr<DownloadShelfContextMenuView> context_menu_; 336 scoped_ptr<DownloadShelfContextMenuView> context_menu_;
333 337
334 // The name of this view as reported to assistive technology. 338 // The name of this view as reported to assistive technology.
335 base::string16 accessible_name_; 339 base::string16 accessible_name_;
336 340
337 // The icon loaded in the download shelf is based on the file path of the 341 // The icon loaded in the download shelf is based on the file path of the
338 // item. Store the path used, so that we can detect a change in the path 342 // item. Store the path used, so that we can detect a change in the path
339 // and reload the icon. 343 // and reload the icon.
340 base::FilePath last_download_item_path_; 344 base::FilePath last_download_item_path_;
341 345
346 // ExperienceSampling: This maintains event state.
msw 2014/08/13 20:11:38 This comment doesn't really add much value... expl
Chris Thompson 2014/08/13 21:18:00 Good point. I've rewritten the comment to explain
347 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
msw 2014/08/13 20:11:38 Why isn't all this done at the cross-platform Down
asanka 2014/08/13 20:59:30 Yeah. chrome://downloads also provides a UI surfac
Chris Thompson 2014/08/13 21:18:00 sampling_event_ should live until the user makes a
Chris Thompson 2014/08/13 21:18:00 Simpler, cross-platform implementation would be id
msw 2014/08/14 01:48:33 I wonder if it'd take just a couple new DownloadIt
348
342 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); 349 DISALLOW_COPY_AND_ASSIGN(DownloadItemView);
343 }; 350 };
344 351
345 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ 352 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698