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

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

Issue 577523002: Refactoring the WeakPtrFactory initialization in chrome/browser/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolved Rebase issues Created 6 years, 3 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 // Whether we are currently disabled as part of opening the downloaded file. 322 // Whether we are currently disabled as part of opening the downloaded file.
323 bool disabled_while_opening_; 323 bool disabled_while_opening_;
324 324
325 // The time at which this view was created. 325 // The time at which this view was created.
326 base::Time creation_time_; 326 base::Time creation_time_;
327 327
328 // The time at which a dangerous download warning was displayed. 328 // The time at which a dangerous download warning was displayed.
329 base::Time time_download_warning_shown_; 329 base::Time time_download_warning_shown_;
330 330
331 // Method factory used to delay reenabling of the item when opening the
332 // downloaded file.
333 base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_;
334
335 // The currently running download context menu. 331 // The currently running download context menu.
336 scoped_ptr<DownloadShelfContextMenuView> context_menu_; 332 scoped_ptr<DownloadShelfContextMenuView> context_menu_;
337 333
338 // The name of this view as reported to assistive technology. 334 // The name of this view as reported to assistive technology.
339 base::string16 accessible_name_; 335 base::string16 accessible_name_;
340 336
341 // The icon loaded in the download shelf is based on the file path of the 337 // The icon loaded in the download shelf is based on the file path of the
342 // item. Store the path used, so that we can detect a change in the path 338 // item. Store the path used, so that we can detect a change in the path
343 // and reload the icon. 339 // and reload the icon.
344 base::FilePath last_download_item_path_; 340 base::FilePath last_download_item_path_;
345 341
346 // ExperienceSampling: This tracks dangerous/malicious downloads warning UI 342 // ExperienceSampling: This tracks dangerous/malicious downloads warning UI
347 // and the user's decisions about it. 343 // and the user's decisions about it.
348 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; 344 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
349 345
346 // Method factory used to delay reenabling of the item when opening the
347 // downloaded file.
348 base::WeakPtrFactory<DownloadItemView> weak_ptr_factory_;
349
350 DISALLOW_COPY_AND_ASSIGN(DownloadItemView); 350 DISALLOW_COPY_AND_ASSIGN(DownloadItemView);
351 }; 351 };
352 352
353 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__ 353 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_ITEM_VIEW_H__
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/extensions/extension_message_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698