| OLD | NEW |
| 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 #include "chrome/browser/ui/views/status_bubble_views.h" | 5 #include "chrome/browser/ui/views/status_bubble_views.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void StartHiding(); | 171 void StartHiding(); |
| 172 void StartShowing(); | 172 void StartShowing(); |
| 173 | 173 |
| 174 // views::View: | 174 // views::View: |
| 175 const char* GetClassName() const override; | 175 const char* GetClassName() const override; |
| 176 void OnPaint(gfx::Canvas* canvas) override; | 176 void OnPaint(gfx::Canvas* canvas) override; |
| 177 | 177 |
| 178 BubbleState state_; | 178 BubbleState state_; |
| 179 BubbleStyle style_; | 179 BubbleStyle style_; |
| 180 | 180 |
| 181 scoped_ptr<StatusViewAnimation> animation_; | 181 std::unique_ptr<StatusViewAnimation> animation_; |
| 182 | 182 |
| 183 // Handle to the widget that contains us. | 183 // Handle to the widget that contains us. |
| 184 views::Widget* popup_; | 184 views::Widget* popup_; |
| 185 | 185 |
| 186 // The currently-displayed text. | 186 // The currently-displayed text. |
| 187 base::string16 text_; | 187 base::string16 text_; |
| 188 | 188 |
| 189 // Holds the theme provider of the frame that created us. | 189 // Holds the theme provider of the frame that created us. |
| 190 const ui::ThemeProvider* theme_provider_; | 190 const ui::ThemeProvider* theme_provider_; |
| 191 | 191 |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 void StatusBubbleViews::SetBubbleWidth(int width) { | 887 void StatusBubbleViews::SetBubbleWidth(int width) { |
| 888 size_.set_width(width); | 888 size_.set_width(width); |
| 889 SetBounds(original_position_.x(), original_position_.y(), | 889 SetBounds(original_position_.x(), original_position_.y(), |
| 890 size_.width(), size_.height()); | 890 size_.width(), size_.height()); |
| 891 } | 891 } |
| 892 | 892 |
| 893 void StatusBubbleViews::CancelExpandTimer() { | 893 void StatusBubbleViews::CancelExpandTimer() { |
| 894 if (expand_timer_factory_.HasWeakPtrs()) | 894 if (expand_timer_factory_.HasWeakPtrs()) |
| 895 expand_timer_factory_.InvalidateWeakPtrs(); | 895 expand_timer_factory_.InvalidateWeakPtrs(); |
| 896 } | 896 } |
| OLD | NEW |