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 26 matching lines...) Expand all Loading... |
37 #include "ui/views/widget/root_view.h" | 37 #include "ui/views/widget/root_view.h" |
38 #include "ui/views/widget/widget.h" | 38 #include "ui/views/widget/widget.h" |
39 #include "url/gurl.h" | 39 #include "url/gurl.h" |
40 | 40 |
41 #if defined(USE_ASH) | 41 #if defined(USE_ASH) |
42 #include "ash/common/wm/window_state.h" | 42 #include "ash/common/wm/window_state.h" |
43 #include "ash/wm/window_state_aura.h" | 43 #include "ash/wm/window_state_aura.h" |
44 #endif | 44 #endif |
45 | 45 |
46 #if defined(MOJO_SHELL_CLIENT) | 46 #if defined(MOJO_SHELL_CLIENT) |
47 #include "components/mus/public/cpp/property_type_converters.h" | 47 #include "services/ui/public/cpp/property_type_converters.h" |
48 #include "components/mus/public/interfaces/window_manager.mojom.h" | 48 #include "services/ui/public/interfaces/window_manager.mojom.h" |
49 #endif | 49 #endif |
50 | 50 |
51 // The alpha and color of the bubble's shadow. | 51 // The alpha and color of the bubble's shadow. |
52 static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0); | 52 static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0); |
53 | 53 |
54 // The roundedness of the edges of our bubble. | 54 // The roundedness of the edges of our bubble. |
55 static const int kBubbleCornerRadius = 4; | 55 static const int kBubbleCornerRadius = 4; |
56 | 56 |
57 // How close the mouse can get to the infobubble before it starts sliding | 57 // How close the mouse can get to the infobubble before it starts sliding |
58 // off-screen. | 58 // off-screen. |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 void StatusBubbleViews::SetBubbleWidth(int width) { | 901 void StatusBubbleViews::SetBubbleWidth(int width) { |
902 size_.set_width(width); | 902 size_.set_width(width); |
903 SetBounds(original_position_.x(), original_position_.y(), | 903 SetBounds(original_position_.x(), original_position_.y(), |
904 size_.width(), size_.height()); | 904 size_.width(), size_.height()); |
905 } | 905 } |
906 | 906 |
907 void StatusBubbleViews::CancelExpandTimer() { | 907 void StatusBubbleViews::CancelExpandTimer() { |
908 if (expand_timer_factory_.HasWeakPtrs()) | 908 if (expand_timer_factory_.HasWeakPtrs()) |
909 expand_timer_factory_.InvalidateWeakPtrs(); | 909 expand_timer_factory_.InvalidateWeakPtrs(); |
910 } | 910 } |
OLD | NEW |