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

Side by Side Diff: ash/system/tray/tray_notification_view.cc

Issue 11229022: Move ash/system/web_notification message_center to ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_event_filter.cc ('k') | ash/system/web_notification/message_center.h » ('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/system/tray/tray_notification_view.h" 5 #include "ash/system/tray/tray_notification_view.h"
6 6
7 #include "ash/system/tray/system_tray_item.h" 7 #include "ash/system/tray/system_tray_item.h"
8 #include "ash/system/tray/tray_constants.h" 8 #include "ash/system/tray/tray_constants.h"
9 #include "grit/ash_resources.h"
10 #include "grit/ash_strings.h" 9 #include "grit/ash_strings.h"
10 #include "grit/ui_resources.h"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
13 #include "ui/views/controls/button/image_button.h" 13 #include "ui/views/controls/button/image_button.h"
14 #include "ui/views/controls/image_view.h" 14 #include "ui/views/controls/image_view.h"
15 #include "ui/views/layout/grid_layout.h" 15 #include "ui/views/layout/grid_layout.h"
16 16
17 namespace { 17 namespace {
18 18
19 const int kNotificationButtonWidth = 32; 19 const int kNotificationButtonWidth = 32;
20 20
(...skipping 13 matching lines...) Expand all
34 34
35 void TrayNotificationView::InitView(views::View* contents) { 35 void TrayNotificationView::InitView(views::View* contents) {
36 set_background(views::Background::CreateSolidBackground(kBackgroundColor)); 36 set_background(views::Background::CreateSolidBackground(kBackgroundColor));
37 37
38 views::GridLayout* layout = new views::GridLayout(this); 38 views::GridLayout* layout = new views::GridLayout(this);
39 SetLayoutManager(layout); 39 SetLayoutManager(layout);
40 40
41 views::ImageButton* close_button = new views::ImageButton(this); 41 views::ImageButton* close_button = new views::ImageButton(this);
42 close_button->SetImage(views::CustomButton::BS_NORMAL, 42 close_button->SetImage(views::CustomButton::BS_NORMAL,
43 ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 43 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
44 IDR_AURA_UBER_TRAY_NOTIFY_CLOSE)); 44 IDR_MESSAGE_CLOSE));
45 close_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER, 45 close_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
46 views::ImageButton::ALIGN_MIDDLE); 46 views::ImageButton::ALIGN_MIDDLE);
47 47
48 icon_ = new views::ImageView; 48 icon_ = new views::ImageView;
49 if (icon_id_ != 0) { 49 if (icon_id_ != 0) {
50 icon_->SetImage( 50 icon_->SetImage(
51 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(icon_id_)); 51 ResourceBundle::GetSharedInstance().GetImageSkiaNamed(icon_id_));
52 } 52 }
53 53
54 views::ColumnSet* columns = layout->AddColumnSet(0); 54 views::ColumnSet* columns = layout->AddColumnSet(0);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 tray_->HideNotificationView(); 143 tray_->HideNotificationView();
144 } 144 }
145 145
146 void TrayNotificationView::HandleClickAction() { 146 void TrayNotificationView::HandleClickAction() {
147 HandleClose(); 147 HandleClose();
148 OnClickAction(); 148 OnClickAction();
149 } 149 }
150 150
151 } // namespace internal 151 } // namespace internal
152 } // namespace ash 152 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_event_filter.cc ('k') | ash/system/web_notification/message_center.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698