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

Side by Side Diff: ash/system/toast/toast_overlay.cc

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 7 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/system/date/date_view.cc ('k') | ash/system/tray/actionable_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 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 DISALLOW_COPY_AND_ASSIGN(ToastOverlayLabel); 71 DISALLOW_COPY_AND_ASSIGN(ToastOverlayLabel);
72 }; 72 };
73 73
74 ToastOverlayLabel::ToastOverlayLabel(const std::string& label) { 74 ToastOverlayLabel::ToastOverlayLabel(const std::string& label) {
75 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 75 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
76 76
77 SetText(base::UTF8ToUTF16(label)); 77 SetText(base::UTF8ToUTF16(label));
78 SetHorizontalAlignment(gfx::ALIGN_LEFT); 78 SetHorizontalAlignment(gfx::ALIGN_LEFT);
79 SetFontList(rb->GetFontList(kTextFontStyle)); 79 SetFontList(rb->GetFontList(kTextFontStyle));
80 SetAutoColorReadabilityEnabled(false); 80 SetAutoColorReadabilityEnabled(false);
81 SetFocusable(false);
82 SetMultiLine(true); 81 SetMultiLine(true);
83 SetEnabledColor(SK_ColorWHITE); 82 SetEnabledColor(SK_ColorWHITE);
84 SetDisabledColor(SK_ColorWHITE); 83 SetDisabledColor(SK_ColorWHITE);
85 SetSubpixelRenderingEnabled(false); 84 SetSubpixelRenderingEnabled(false);
86 } 85 }
87 86
88 ToastOverlayLabel::~ToastOverlayLabel() {} 87 ToastOverlayLabel::~ToastOverlayLabel() {}
89 88
90 void ToastOverlayLabel::SetMaximumWidth(int width) { 89 void ToastOverlayLabel::SetMaximumWidth(int width) {
91 maximum_width_ = width; 90 maximum_width_ = width;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 277
279 views::Widget* ToastOverlay::widget_for_testing() { 278 views::Widget* ToastOverlay::widget_for_testing() {
280 return overlay_widget_.get(); 279 return overlay_widget_.get();
281 } 280 }
282 281
283 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { 282 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) {
284 overlay_view_->button()->NotifyClick(event); 283 overlay_view_->button()->NotifyClick(event);
285 } 284 }
286 285
287 } // namespace ash 286 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/date/date_view.cc ('k') | ash/system/tray/actionable_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698