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

Side by Side Diff: ash/common/shelf/shelf_widget.h

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: update return type 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
« no previous file with comments | « ash/ash_chromeos_strings.grdp ('k') | ash/common/shelf/shelf_widget.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_COMMON_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_WIDGET_H_
6 #define ASH_COMMON_SHELF_SHELF_WIDGET_H_ 6 #define ASH_COMMON_SHELF_SHELF_WIDGET_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/shelf/shelf_background_animator.h" 11 #include "ash/common/shelf/shelf_background_animator.h"
12 #include "ash/common/shelf/shelf_background_animator_observer.h" 12 #include "ash/common/shelf/shelf_background_animator_observer.h"
13 #include "ash/common/shelf/shelf_layout_manager_observer.h" 13 #include "ash/common/shelf/shelf_layout_manager_observer.h"
14 #include "ash/public/cpp/shelf_types.h" 14 #include "ash/public/cpp/shelf_types.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
17 #include "ui/views/widget/widget_observer.h" 17 #include "ui/views/widget/widget_observer.h"
18 18
19 namespace app_list { 19 namespace app_list {
20 class ApplicationDragAndDropHost; 20 class ApplicationDragAndDropHost;
21 } 21 }
22 22
23 namespace ash { 23 namespace ash {
24 class AppListButton; 24 class AppListButton;
25 class FocusCycler; 25 class FocusCycler;
26 class ShelfLayoutManager; 26 class ShelfLayoutManager;
27 class ShelfView; 27 class ShelfView;
28 class SmsObserver;
28 class StatusAreaWidget; 29 class StatusAreaWidget;
29 class WmShelf; 30 class WmShelf;
30 class WmWindow; 31 class WmWindow;
31 32
33 namespace test {
34 class SmsObserverTest;
35 }
36
32 // The ShelfWidget manages the shelf view (which contains the shelf icons) and 37 // The ShelfWidget manages the shelf view (which contains the shelf icons) and
33 // the status area widget. There is one ShelfWidget per display. It is created 38 // the status area widget. There is one ShelfWidget per display. It is created
34 // early during RootWindowController initialization. 39 // early during RootWindowController initialization.
35 class ASH_EXPORT ShelfWidget : public views::Widget, 40 class ASH_EXPORT ShelfWidget : public views::Widget,
36 public views::WidgetObserver, 41 public views::WidgetObserver,
37 public ShelfBackgroundAnimatorObserver, 42 public ShelfBackgroundAnimatorObserver,
38 public ShelfLayoutManagerObserver { 43 public ShelfLayoutManagerObserver {
39 public: 44 public:
40 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf); 45 ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf);
41 ~ShelfWidget() override; 46 ~ShelfWidget() override;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 101
97 // ShelfBackgroundAnimatorObserver overrides: 102 // ShelfBackgroundAnimatorObserver overrides:
98 void UpdateShelfItemBackground(int alpha) override; 103 void UpdateShelfItemBackground(int alpha) override;
99 104
100 // ShelfLayoutManagerObserver overrides: 105 // ShelfLayoutManagerObserver overrides:
101 void WillDeleteShelfLayoutManager() override; 106 void WillDeleteShelfLayoutManager() override;
102 107
103 private: 108 private:
104 class DelegateView; 109 class DelegateView;
105 friend class DelegateView; 110 friend class DelegateView;
111 friend class ash::test::SmsObserverTest;
106 112
107 WmShelf* wm_shelf_; 113 WmShelf* wm_shelf_;
108 114
109 // Owned by the shelf container's window. 115 // Owned by the shelf container's window.
110 ShelfLayoutManager* shelf_layout_manager_; 116 ShelfLayoutManager* shelf_layout_manager_;
111 117
112 // Owned by the native widget. 118 // Owned by the native widget.
113 StatusAreaWidget* status_area_widget_; 119 StatusAreaWidget* status_area_widget_;
114 120
115 // |delegate_view_| is the contents view of this widget and is cleaned up 121 // |delegate_view_| is the contents view of this widget and is cleaned up
116 // during CloseChildWindows of the associated RootWindowController. 122 // during CloseChildWindows of the associated RootWindowController.
117 DelegateView* delegate_view_; 123 DelegateView* delegate_view_;
118 // View containing the shelf items. Owned by the views hierarchy. Null when 124 // View containing the shelf items. Owned by the views hierarchy. Null when
119 // at the login screen. 125 // at the login screen.
120 ShelfView* shelf_view_; 126 ShelfView* shelf_view_;
121 ShelfBackgroundAnimator background_animator_; 127 ShelfBackgroundAnimator background_animator_;
128 std::unique_ptr<SmsObserver> sms_observer_;
122 bool activating_as_fallback_; 129 bool activating_as_fallback_;
123 130
124 DISALLOW_COPY_AND_ASSIGN(ShelfWidget); 131 DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
125 }; 132 };
126 133
127 } // namespace ash 134 } // namespace ash
128 135
129 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_ 136 #endif // ASH_COMMON_SHELF_SHELF_WIDGET_H_
OLDNEW
« no previous file with comments | « ash/ash_chromeos_strings.grdp ('k') | ash/common/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698