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

Side by Side Diff: ui/message_center/views/toast_contents_view.h

Issue 1913433004: Supporting shrinking/enlarging for notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void AnimationProgressed(const gfx::Animation* animation) override; 95 void AnimationProgressed(const gfx::Animation* animation) override;
96 void AnimationEnded(const gfx::Animation* animation) override; 96 void AnimationEnded(const gfx::Animation* animation) override;
97 void AnimationCanceled(const gfx::Animation* animation) override; 97 void AnimationCanceled(const gfx::Animation* animation) override;
98 98
99 // Overridden from views::WidgetDelegate: 99 // Overridden from views::WidgetDelegate:
100 views::View* GetContentsView() override; 100 views::View* GetContentsView() override;
101 void WindowClosing() override; 101 void WindowClosing() override;
102 void OnDisplayChanged() override; 102 void OnDisplayChanged() override;
103 void OnWorkAreaChanged() override; 103 void OnWorkAreaChanged() override;
104 104
105 // Recalculates preferred size from underlying view and notifies about it.
106 void UpdatePreferredSize();
107
105 // Initialization and update. 108 // Initialization and update.
106 void CreateWidget(gfx::NativeView parent); 109 void CreateWidget(gfx::NativeView parent);
107 110
108 // Immediately moves the toast without any sort of delay or animation. 111 // Immediately moves the toast without any sort of delay or animation.
109 void SetBoundsInstantly(gfx::Rect new_bounds); 112 void SetBoundsInstantly(gfx::Rect new_bounds);
110 113
111 // Given the bounds of a toast on the screen, compute the bouds for that 114 // Given the bounds of a toast on the screen, compute the bouds for that
112 // toast in 'closed' state. The 'closed' state is used as origin/destination 115 // toast in 'closed' state. The 'closed' state is used as origin/destination
113 // in reveal/closing animations. 116 // in reveal/closing animations.
114 gfx::Rect GetClosedToastBounds(gfx::Rect bounds); 117 gfx::Rect GetClosedToastBounds(gfx::Rect bounds);
(...skipping 20 matching lines...) Expand all
135 138
136 gfx::Point origin_; 139 gfx::Point origin_;
137 gfx::Size preferred_size_; 140 gfx::Size preferred_size_;
138 141
139 DISALLOW_COPY_AND_ASSIGN(ToastContentsView); 142 DISALLOW_COPY_AND_ASSIGN(ToastContentsView);
140 }; 143 };
141 144
142 } // namespace message_center 145 } // namespace message_center
143 146
144 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 147 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698