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

Side by Side Diff: ash/common/system/chromeos/screen_security/screen_tray_item.cc

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: address comments 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/screen_security/screen_tray_item.h" 5 #include "ash/common/system/chromeos/screen_security/screen_tray_item.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/shelf/wm_shelf_util.h" 8 #include "ash/common/shelf/wm_shelf_util.h"
9 #include "ash/common/system/tray/fixed_sized_image_view.h" 9 #include "ash/common/system/tray/fixed_sized_image_view.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 label_->SetMultiLine(true); 99 label_->SetMultiLine(true);
100 label_->SetText(label_text_); 100 label_->SetText(label_text_);
101 // TODO(bruthig): Multiline Labels don't lay out well with borders. 101 // TODO(bruthig): Multiline Labels don't lay out well with borders.
102 // See https://crbug.com/678337 & https://crbug.com/682221. 102 // See https://crbug.com/678337 & https://crbug.com/682221.
103 label_->SetBorder(nullptr); 103 label_->SetBorder(nullptr);
104 104
105 stop_button_ = TrayPopupUtils::CreateTrayPopupButton(this, stop_button_text_); 105 stop_button_ = TrayPopupUtils::CreateTrayPopupButton(this, stop_button_text_);
106 } 106 }
107 107
108 void ScreenStatusView::UpdateFromScreenTrayItem() { 108 void ScreenStatusView::UpdateFromScreenTrayItem() {
109 // Hide the notification bubble when the ash tray bubble opens.
110 screen_tray_item_->HideNotificationView();
111 SetVisible(screen_tray_item_->is_started()); 109 SetVisible(screen_tray_item_->is_started());
112 } 110 }
113 111
114 void ScreenStatusView::OnNativeThemeChanged(const ui::NativeTheme* theme) { 112 void ScreenStatusView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
115 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) { 113 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) {
116 views::View::OnNativeThemeChanged(theme); 114 views::View::OnNativeThemeChanged(theme);
117 return; 115 return;
118 } 116 }
119 117
120 if (theme) { 118 if (theme) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 197
200 void ScreenTrayItem::DestroyTrayView() { 198 void ScreenTrayItem::DestroyTrayView() {
201 tray_view_ = nullptr; 199 tray_view_ = nullptr;
202 } 200 }
203 201
204 void ScreenTrayItem::DestroyDefaultView() { 202 void ScreenTrayItem::DestroyDefaultView() {
205 default_view_ = nullptr; 203 default_view_ = nullptr;
206 } 204 }
207 205
208 } // namespace ash 206 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698