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

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

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: cleanup Created 3 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
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/public/cpp/ash_typography.h" 7 #include "ash/public/cpp/ash_typography.h"
8 #include "ash/public/cpp/shell_window_ids.h" 8 #include "ash/public/cpp/shell_window_ids.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/wm_shelf.h" 10 #include "ash/shelf/shelf.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/strings/grit/ash_strings.h" 12 #include "ash/strings/grit/ash_strings.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/threading/thread_task_runner_handle.h" 15 #include "base/threading/thread_task_runner_handle.h"
16 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/gfx/canvas.h" 18 #include "ui/gfx/canvas.h"
19 #include "ui/gfx/font_list.h" 19 #include "ui/gfx/font_list.h"
20 #include "ui/views/border.h" 20 #include "ui/views/border.h"
(...skipping 21 matching lines...) Expand all
42 42
43 // These values are in DIP. 43 // These values are in DIP.
44 const int kToastHorizontalSpacing = 16; 44 const int kToastHorizontalSpacing = 16;
45 const int kToastVerticalSpacing = 16; 45 const int kToastVerticalSpacing = 16;
46 const int kToastMaximumWidth = 568; 46 const int kToastMaximumWidth = 568;
47 const int kToastMinimumWidth = 288; 47 const int kToastMinimumWidth = 288;
48 48
49 // Returns the work area bounds for the root window where new windows are added 49 // Returns the work area bounds for the root window where new windows are added
50 // (including new toasts). 50 // (including new toasts).
51 gfx::Rect GetUserWorkAreaBounds() { 51 gfx::Rect GetUserWorkAreaBounds() {
52 return WmShelf::ForWindow(Shell::GetRootWindowForNewWindows()) 52 return Shelf::ForWindow(Shell::GetRootWindowForNewWindows())
53 ->GetUserWorkAreaBounds(); 53 ->GetUserWorkAreaBounds();
54 } 54 }
55 55
56 } // anonymous namespace 56 } // anonymous namespace
57 57
58 /////////////////////////////////////////////////////////////////////////////// 58 ///////////////////////////////////////////////////////////////////////////////
59 // ToastOverlayLabel 59 // ToastOverlayLabel
60 class ToastOverlayLabel : public views::Label { 60 class ToastOverlayLabel : public views::Label {
61 public: 61 public:
62 explicit ToastOverlayLabel(const base::string16& label); 62 explicit ToastOverlayLabel(const base::string16& label);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 ToastOverlayButton* ToastOverlay::dismiss_button_for_testing() { 289 ToastOverlayButton* ToastOverlay::dismiss_button_for_testing() {
290 return overlay_view_->button(); 290 return overlay_view_->button();
291 } 291 }
292 292
293 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) { 293 void ToastOverlay::ClickDismissButtonForTesting(const ui::Event& event) {
294 DCHECK(overlay_view_->button()); 294 DCHECK(overlay_view_->button());
295 overlay_view_->button()->NotifyClick(event); 295 overlay_view_->button()->NotifyClick(event);
296 } 296 }
297 297
298 } // namespace ash 298 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698