| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/toast/toast_overlay.h" | 5 #include "ash/system/toast/toast_overlay.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shelf/shelf.h" | 8 #include "ash/shelf/shelf.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 DISALLOW_COPY_AND_ASSIGN(ToastOverlayLabel); | 58 DISALLOW_COPY_AND_ASSIGN(ToastOverlayLabel); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 ToastOverlayLabel::ToastOverlayLabel(const std::string& label) { | 61 ToastOverlayLabel::ToastOverlayLabel(const std::string& label) { |
| 62 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); | 62 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
| 63 | 63 |
| 64 SetText(base::UTF8ToUTF16(label)); | 64 SetText(base::UTF8ToUTF16(label)); |
| 65 SetHorizontalAlignment(gfx::ALIGN_LEFT); | 65 SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 66 SetFontList(rb->GetFontList(kTextFontStyle)); | 66 SetFontList(rb->GetFontList(kTextFontStyle)); |
| 67 SetAutoColorReadabilityEnabled(false); | 67 SetAutoColorReadabilityEnabled(false); |
| 68 SetFocusable(false); | 68 SetFocusBehavior(FocusBehavior::NEVER); |
| 69 SetEnabledColor(SK_ColorWHITE); | 69 SetEnabledColor(SK_ColorWHITE); |
| 70 SetDisabledColor(SK_ColorWHITE); | 70 SetDisabledColor(SK_ColorWHITE); |
| 71 SetSubpixelRenderingEnabled(false); | 71 SetSubpixelRenderingEnabled(false); |
| 72 } | 72 } |
| 73 | 73 |
| 74 ToastOverlayLabel::~ToastOverlayLabel() {} | 74 ToastOverlayLabel::~ToastOverlayLabel() {} |
| 75 | 75 |
| 76 /////////////////////////////////////////////////////////////////////////////// | 76 /////////////////////////////////////////////////////////////////////////////// |
| 77 // ToastOverlayButton | 77 // ToastOverlayButton |
| 78 class ToastOverlayButton : public views::LabelButton { | 78 class ToastOverlayButton : public views::LabelButton { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 views::Widget* ToastOverlay::widget_for_testing() { | 243 views::Widget* ToastOverlay::widget_for_testing() { |
| 244 return overlay_widget_.get(); | 244 return overlay_widget_.get(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { | 247 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { |
| 248 overlay_view_->button()->NotifyClick(event); | 248 overlay_view_->button()->NotifyClick(event); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace ash | 251 } // namespace ash |
| OLD | NEW |