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" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/themes/theme_service.h" | 14 #include "chrome/browser/themes/theme_service.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
19 #include "third_party/skia/include/core/SkPaint.h" | 19 #include "third_party/skia/include/core/SkPaint.h" |
20 #include "third_party/skia/include/core/SkPath.h" | 20 #include "third_party/skia/include/core/SkPath.h" |
21 #include "third_party/skia/include/core/SkRect.h" | 21 #include "third_party/skia/include/core/SkRect.h" |
22 #include "ui/base/animation/animation_delegate.h" | 22 #include "ui/base/animation/animation_delegate.h" |
23 #include "ui/base/animation/linear_animation.h" | 23 #include "ui/base/animation/linear_animation.h" |
24 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/base/text/text_elider.h" | 25 #include "ui/base/text/text_elider.h" |
26 #include "ui/gfx/canvas_skia.h" | 26 #include "ui/gfx/canvas.h" |
27 #include "ui/gfx/point.h" | 27 #include "ui/gfx/point.h" |
28 #include "ui/gfx/screen.h" | 28 #include "ui/gfx/screen.h" |
29 #include "ui/views/controls/label.h" | 29 #include "ui/views/controls/label.h" |
30 #include "ui/views/controls/scrollbar/native_scroll_bar.h" | 30 #include "ui/views/controls/scrollbar/native_scroll_bar.h" |
31 #include "ui/views/widget/root_view.h" | 31 #include "ui/views/widget/root_view.h" |
32 #include "ui/views/widget/widget.h" | 32 #include "ui/views/widget/widget.h" |
33 | 33 |
34 using views::Widget; | 34 using views::Widget; |
35 | 35 |
36 // The alpha and color of the bubble's shadow. | 36 // The alpha and color of the bubble's shadow. |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 void StatusBubbleViews::SetBubbleWidth(int width) { | 836 void StatusBubbleViews::SetBubbleWidth(int width) { |
837 size_.set_width(width); | 837 size_.set_width(width); |
838 SetBounds(original_position_.x(), original_position_.y(), | 838 SetBounds(original_position_.x(), original_position_.y(), |
839 size_.width(), size_.height()); | 839 size_.width(), size_.height()); |
840 } | 840 } |
841 | 841 |
842 void StatusBubbleViews::CancelExpandTimer() { | 842 void StatusBubbleViews::CancelExpandTimer() { |
843 if (expand_timer_factory_.HasWeakPtrs()) | 843 if (expand_timer_factory_.HasWeakPtrs()) |
844 expand_timer_factory_.InvalidateWeakPtrs(); | 844 expand_timer_factory_.InvalidateWeakPtrs(); |
845 } | 845 } |
OLD | NEW |