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

Side by Side Diff: ash/system/status_area_widget_delegate.h

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/status_area_widget_delegate.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 (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 #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ 5 #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ 6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/public/cpp/shelf_types.h" 9 #include "ash/public/cpp/shelf_types.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/views/accessible_pane_view.h" 12 #include "ui/views/accessible_pane_view.h"
13 #include "ui/views/widget/widget_delegate.h" 13 #include "ui/views/widget/widget_delegate.h"
14 14
15 namespace ash { 15 namespace ash {
16 class FocusCycler; 16 class FocusCycler;
17 class WmShelf; 17 class Shelf;
18 18
19 // The View for the status area widget. 19 // The View for the status area widget.
20 class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView, 20 class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView,
21 public views::WidgetDelegate { 21 public views::WidgetDelegate {
22 public: 22 public:
23 explicit StatusAreaWidgetDelegate(WmShelf* wm_shelf); 23 explicit StatusAreaWidgetDelegate(Shelf* shelf);
24 ~StatusAreaWidgetDelegate() override; 24 ~StatusAreaWidgetDelegate() override;
25 25
26 // Returns status area widget delegate from primary system tray if exists, 26 // Returns status area widget delegate from primary system tray if exists,
27 // otherwise nullptr. 27 // otherwise nullptr.
28 static StatusAreaWidgetDelegate* GetPrimaryInstance(); 28 static StatusAreaWidgetDelegate* GetPrimaryInstance();
29 29
30 // Add a tray view to the widget (e.g. system tray, web notifications). 30 // Add a tray view to the widget (e.g. system tray, web notifications).
31 void AddTray(views::View* tray); 31 void AddTray(views::View* tray);
32 32
33 // Called whenever layout might change (e.g. alignment changed). 33 // Called whenever layout might change (e.g. alignment changed).
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void ChildVisibilityChanged(views::View* child) override; 65 void ChildVisibilityChanged(views::View* child) override;
66 66
67 private: 67 private:
68 void UpdateWidgetSize(); 68 void UpdateWidgetSize();
69 69
70 // Sets a border on |child|. If |extend_border_to_edge| is true, then an extra 70 // Sets a border on |child|. If |extend_border_to_edge| is true, then an extra
71 // wide border is added to extend the view's hit region to the edge of the 71 // wide border is added to extend the view's hit region to the edge of the
72 // screen. 72 // screen.
73 void SetBorderOnChild(views::View* child, bool extend_border_to_edge); 73 void SetBorderOnChild(views::View* child, bool extend_border_to_edge);
74 74
75 WmShelf* const wm_shelf_; 75 Shelf* const shelf_;
76 const FocusCycler* focus_cycler_for_testing_; 76 const FocusCycler* focus_cycler_for_testing_;
77 77
78 // When true, the default focus of the status area widget is the last 78 // When true, the default focus of the status area widget is the last
79 // focusable child. 79 // focusable child.
80 bool default_last_focusable_child_ = false; 80 bool default_last_focusable_child_ = false;
81 81
82 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate); 82 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidgetDelegate);
83 }; 83 };
84 84
85 } // namespace ash 85 } // namespace ash
86 86
87 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_ 87 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/status_area_widget_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698