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

Side by Side Diff: ash/common/system/web_notification/web_notification_tray.cc

Issue 2733823003: Move final vector icons out of ui/gfx/vector_icons/ and remove the (Closed)
Patch Set: fix deps Created 3 years, 9 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 | « ash/common/system/tray_accessibility.cc ('k') | ash/common/wm/overview/window_selector.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 "ash/common/system/web_notification/web_notification_tray.h" 5 #include "ash/common/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 13 matching lines...) Expand all
24 #include "ash/strings/grit/ash_strings.h" 24 #include "ash/strings/grit/ash_strings.h"
25 #include "base/auto_reset.h" 25 #include "base/auto_reset.h"
26 #include "base/i18n/number_formatting.h" 26 #include "base/i18n/number_formatting.h"
27 #include "base/i18n/rtl.h" 27 #include "base/i18n/rtl.h"
28 #include "base/strings/utf_string_conversions.h" 28 #include "base/strings/utf_string_conversions.h"
29 #include "base/threading/thread_task_runner_handle.h" 29 #include "base/threading/thread_task_runner_handle.h"
30 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
31 #include "ui/display/display.h" 31 #include "ui/display/display.h"
32 #include "ui/display/screen.h" 32 #include "ui/display/screen.h"
33 #include "ui/gfx/paint_vector_icon.h" 33 #include "ui/gfx/paint_vector_icon.h"
34 #include "ui/gfx/vector_icons_public.h"
35 #include "ui/message_center/message_center_style.h" 34 #include "ui/message_center/message_center_style.h"
36 #include "ui/message_center/message_center_tray_delegate.h" 35 #include "ui/message_center/message_center_tray_delegate.h"
37 #include "ui/message_center/views/message_bubble_base.h" 36 #include "ui/message_center/views/message_bubble_base.h"
38 #include "ui/message_center/views/message_center_bubble.h" 37 #include "ui/message_center/views/message_center_bubble.h"
39 #include "ui/message_center/views/message_popup_collection.h" 38 #include "ui/message_center/views/message_popup_collection.h"
40 #include "ui/strings/grit/ui_strings.h" 39 #include "ui/strings/grit/ui_strings.h"
40 #include "ui/vector_icons/vector_icons.h"
41 #include "ui/views/bubble/tray_bubble_view.h" 41 #include "ui/views/bubble/tray_bubble_view.h"
42 #include "ui/views/controls/image_view.h" 42 #include "ui/views/controls/image_view.h"
43 #include "ui/views/controls/label.h" 43 #include "ui/views/controls/label.h"
44 #include "ui/views/controls/menu/menu_runner.h" 44 #include "ui/views/controls/menu/menu_runner.h"
45 #include "ui/views/layout/fill_layout.h" 45 #include "ui/views/layout/fill_layout.h"
46 46
47 namespace message_center { 47 namespace message_center {
48 48
49 MessageCenterTrayDelegate* CreateMessageCenterTray() { 49 MessageCenterTrayDelegate* CreateMessageCenterTray() {
50 // On non-CrOS, the Tray will not be hosted in ash::Shell. 50 // On non-CrOS, the Tray will not be hosted in ash::Shell.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 SetInkDropMode(InkDropMode::ON); 299 SetInkDropMode(InkDropMode::ON);
300 SetContentsBackground(false); 300 SetContentsBackground(false);
301 gfx::ImageSkia bell_image = 301 gfx::ImageSkia bell_image =
302 CreateVectorIcon(kShelfNotificationsIcon, kShelfIconColor); 302 CreateVectorIcon(kShelfNotificationsIcon, kShelfIconColor);
303 const gfx::Size bell_icon_size = kTrayItemInnerIconSize; 303 const gfx::Size bell_icon_size = kTrayItemInnerIconSize;
304 bell_icon_.reset(new WebNotificationImage( 304 bell_icon_.reset(new WebNotificationImage(
305 bell_image, bell_icon_size, animation_container_.get(), this)); 305 bell_image, bell_icon_size, animation_container_.get(), this));
306 } else { 306 } else {
307 SetContentsBackground(true); 307 SetContentsBackground(true);
308 gfx::ImageSkia bell_image = 308 gfx::ImageSkia bell_image =
309 CreateVectorIcon(gfx::VectorIconId::NOTIFICATIONS, kNoUnreadIconSize, 309 CreateVectorIcon(ui::kNotificationsIcon, kNoUnreadIconSize,
310 kWebNotificationColorNoUnread); 310 kWebNotificationColorNoUnread);
311 const gfx::Size bell_icon_size = kTrayItemInnerBellIconSizeNonMd; 311 const gfx::Size bell_icon_size = kTrayItemInnerBellIconSizeNonMd;
312 bell_icon_.reset(new WebNotificationImage( 312 bell_icon_.reset(new WebNotificationImage(
313 bell_image, bell_icon_size, animation_container_.get(), this)); 313 bell_image, bell_icon_size, animation_container_.get(), this));
314 } 314 }
315 tray_container()->AddChildView(bell_icon_.get()); 315 tray_container()->AddChildView(bell_icon_.get());
316 316
317 counter_.reset(new WebNotificationLabel(animation_container_.get(), this)); 317 counter_.reset(new WebNotificationLabel(animation_container_.get(), this));
318 tray_container()->AddChildView(counter_.get()); 318 tray_container()->AddChildView(counter_.get());
319 319
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 652
653 message_center::MessageCenterBubble* 653 message_center::MessageCenterBubble*
654 WebNotificationTray::GetMessageCenterBubbleForTest() { 654 WebNotificationTray::GetMessageCenterBubbleForTest() {
655 if (!message_center_bubble()) 655 if (!message_center_bubble())
656 return nullptr; 656 return nullptr;
657 return static_cast<message_center::MessageCenterBubble*>( 657 return static_cast<message_center::MessageCenterBubble*>(
658 message_center_bubble()->bubble()); 658 message_center_bubble()->bubble());
659 } 659 }
660 660
661 } // namespace ash 661 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray_accessibility.cc ('k') | ash/common/wm/overview/window_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698