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

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

Issue 23764003: Make toasts notice when they're hidden and send the mouse-out event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "ui/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Computes the size of the toast assuming it will host the given view. 63 // Computes the size of the toast assuming it will host the given view.
64 static gfx::Size GetToastSizeForView(views::View* view); 64 static gfx::Size GetToastSizeForView(views::View* view);
65 65
66 // Overridden from views::View: 66 // Overridden from views::View:
67 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 67 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE;
68 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 68 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
69 virtual void Layout() OVERRIDE; 69 virtual void Layout() OVERRIDE;
70 virtual gfx::Size GetPreferredSize() OVERRIDE; 70 virtual gfx::Size GetPreferredSize() OVERRIDE;
71 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 71 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
72 virtual void VisibilityChanged(
73 views::View* starting_from,
74 bool is_visible) OVERRIDE;
72 75
73 private: 76 private:
74 // Overridden from ui::AnimationDelegate: 77 // Overridden from ui::AnimationDelegate:
75 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 78 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
76 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 79 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
77 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE; 80 virtual void AnimationCanceled(const ui::Animation* animation) OVERRIDE;
78 81
79 // Overridden from views::WidgetDelegate: 82 // Overridden from views::WidgetDelegate:
80 virtual views::View* GetContentsView() OVERRIDE; 83 virtual views::View* GetContentsView() OVERRIDE;
81 virtual void WindowClosing() OVERRIDE; 84 virtual void WindowClosing() OVERRIDE;
(...skipping 30 matching lines...) Expand all
112 115
113 gfx::Point origin_; 116 gfx::Point origin_;
114 gfx::Size preferred_size_; 117 gfx::Size preferred_size_;
115 118
116 DISALLOW_COPY_AND_ASSIGN(ToastContentsView); 119 DISALLOW_COPY_AND_ASSIGN(ToastContentsView);
117 }; 120 };
118 121
119 } // namespace message_center 122 } // namespace message_center
120 123
121 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 124 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/toast_contents_view.cc » ('j') | ui/message_center/views/toast_contents_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698