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

Side by Side Diff: chrome/browser/ui/views/download/download_shelf_view.cc

Issue 2667753006: Make new target for vector icon structs to replace ui/gfx/vector_icons/ (Closed)
Patch Set: fix deps Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/views/download/download_shelf_view.h" 5 #include "chrome/browser/ui/views/download/download_shelf_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 12 matching lines...) Expand all
23 #include "chrome/grit/theme_resources.h" 23 #include "chrome/grit/theme_resources.h"
24 #include "components/strings/grit/components_strings.h" 24 #include "components/strings/grit/components_strings.h"
25 #include "content/public/browser/download_item.h" 25 #include "content/public/browser/download_item.h"
26 #include "content/public/browser/download_manager.h" 26 #include "content/public/browser/download_manager.h"
27 #include "content/public/browser/page_navigator.h" 27 #include "content/public/browser/page_navigator.h"
28 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
29 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
30 #include "ui/base/theme_provider.h" 30 #include "ui/base/theme_provider.h"
31 #include "ui/gfx/animation/slide_animation.h" 31 #include "ui/gfx/animation/slide_animation.h"
32 #include "ui/gfx/canvas.h" 32 #include "ui/gfx/canvas.h"
33 #include "ui/gfx/vector_icons_public.h"
34 #include "ui/resources/grit/ui_resources.h" 33 #include "ui/resources/grit/ui_resources.h"
34 #include "ui/vector_icons/vector_icons.h"
35 #include "ui/views/background.h" 35 #include "ui/views/background.h"
36 #include "ui/views/border.h" 36 #include "ui/views/border.h"
37 #include "ui/views/controls/button/md_text_button.h" 37 #include "ui/views/controls/button/md_text_button.h"
38 #include "ui/views/controls/button/vector_icon_button.h" 38 #include "ui/views/controls/button/vector_icon_button.h"
39 #include "ui/views/controls/link.h" 39 #include "ui/views/controls/link.h"
40 #include "ui/views/mouse_watcher_view_host.h" 40 #include "ui/views/mouse_watcher_view_host.h"
41 41
42 using content::DownloadItem; 42 using content::DownloadItem;
43 43
44 namespace { 44 namespace {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 mouse_watcher_.set_notify_on_exit_time( 106 mouse_watcher_.set_notify_on_exit_time(
107 base::TimeDelta::FromMilliseconds(kNotifyOnExitTimeMS)); 107 base::TimeDelta::FromMilliseconds(kNotifyOnExitTimeMS));
108 set_id(VIEW_ID_DOWNLOAD_SHELF); 108 set_id(VIEW_ID_DOWNLOAD_SHELF);
109 parent->AddChildView(this); 109 parent->AddChildView(this);
110 110
111 show_all_view_ = views::MdTextButton::Create( 111 show_all_view_ = views::MdTextButton::Create(
112 this, l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS)); 112 this, l10n_util::GetStringUTF16(IDS_SHOW_ALL_DOWNLOADS));
113 AddChildView(show_all_view_); 113 AddChildView(show_all_view_);
114 114
115 views::VectorIconButton* close_button = new views::VectorIconButton(this); 115 views::VectorIconButton* close_button = new views::VectorIconButton(this);
116 close_button->SetIcon(gfx::VectorIconId::BAR_CLOSE); 116 close_button->SetIcon(ui::kCloseIcon);
117 close_button_ = close_button; 117 close_button_ = close_button;
118 close_button_->SetAccessibleName( 118 close_button_->SetAccessibleName(
119 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); 119 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
120 AddChildView(close_button_); 120 AddChildView(close_button_);
121 121
122 new_item_animation_.SetSlideDuration(kNewItemAnimationDurationMs); 122 new_item_animation_.SetSlideDuration(kNewItemAnimationDurationMs);
123 shelf_animation_.SetSlideDuration(kShelfAnimationDurationMs); 123 shelf_animation_.SetSlideDuration(kShelfAnimationDurationMs);
124 } 124 }
125 125
126 DownloadShelfView::~DownloadShelfView() { 126 DownloadShelfView::~DownloadShelfView() {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 SetVisible(false); 413 SetVisible(false);
414 } 414 }
415 415
416 bool DownloadShelfView::CanAutoClose() { 416 bool DownloadShelfView::CanAutoClose() {
417 for (size_t i = 0; i < download_views_.size(); ++i) { 417 for (size_t i = 0; i < download_views_.size(); ++i) {
418 if (!download_views_[i]->download()->GetOpened()) 418 if (!download_views_[i]->download()->GetOpened())
419 return false; 419 return false;
420 } 420 }
421 return true; 421 return true;
422 } 422 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698