| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |