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

Side by Side Diff: ash/common/system/tray/tray_background_view.h

Issue 2243563002: Show small notification icons in notification tray (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | ash/common/system/tray/tray_background_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 (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_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 25 matching lines...) Expand all
36 // auto-resizes the widget when necessary. 36 // auto-resizes the widget when necessary.
37 class TrayContainer : public views::View { 37 class TrayContainer : public views::View {
38 public: 38 public:
39 explicit TrayContainer(ShelfAlignment alignment); 39 explicit TrayContainer(ShelfAlignment alignment);
40 ~TrayContainer() override {} 40 ~TrayContainer() override {}
41 41
42 void SetAlignment(ShelfAlignment alignment); 42 void SetAlignment(ShelfAlignment alignment);
43 43
44 void set_size(const gfx::Size& size) { size_ = size; } 44 void set_size(const gfx::Size& size) { size_ = size; }
45 45
46 void SetMargin(const gfx::Insets& margin);
47
46 // views::View: 48 // views::View:
47 gfx::Size GetPreferredSize() const override; 49 gfx::Size GetPreferredSize() const override;
48 50
49 protected: 51 protected:
50 // views::View: 52 // views::View:
51 void ChildPreferredSizeChanged(views::View* child) override; 53 void ChildPreferredSizeChanged(views::View* child) override;
52 void ChildVisibilityChanged(View* child) override; 54 void ChildVisibilityChanged(View* child) override;
53 void ViewHierarchyChanged( 55 void ViewHierarchyChanged(
54 const ViewHierarchyChangedDetails& details) override; 56 const ViewHierarchyChangedDetails& details) override;
55 57
56 private: 58 private:
57 void UpdateLayout(); 59 void UpdateLayout();
58 60
59 ShelfAlignment alignment_; 61 ShelfAlignment alignment_;
60 gfx::Size size_; 62 gfx::Size size_;
63 gfx::Insets margin_;
61 64
62 DISALLOW_COPY_AND_ASSIGN(TrayContainer); 65 DISALLOW_COPY_AND_ASSIGN(TrayContainer);
63 }; 66 };
64 67
65 explicit TrayBackgroundView(WmShelf* wm_shelf); 68 explicit TrayBackgroundView(WmShelf* wm_shelf);
66 ~TrayBackgroundView() override; 69 ~TrayBackgroundView() override;
67 70
68 // Called after the tray has been added to the widget containing it. 71 // Called after the tray has been added to the widget containing it.
69 virtual void Initialize(); 72 virtual void Initialize();
70 73
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 172
170 std::unique_ptr<TrayWidgetObserver> widget_observer_; 173 std::unique_ptr<TrayWidgetObserver> widget_observer_;
171 std::unique_ptr<TrayEventFilter> tray_event_filter_; 174 std::unique_ptr<TrayEventFilter> tray_event_filter_;
172 175
173 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); 176 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
174 }; 177 };
175 178
176 } // namespace ash 179 } // namespace ash
177 180
178 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 181 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698