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

Side by Side Diff: chrome/browser/ui/views/status_bubble_views.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_skia.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/widget/root_view.h"
30 #include "ui/views/widget/widget.h"
29 #include "views/controls/label.h" 31 #include "views/controls/label.h"
30 #include "views/controls/scrollbar/native_scroll_bar.h" 32 #include "views/controls/scrollbar/native_scroll_bar.h"
31 #include "views/widget/root_view.h"
32 #include "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.
37 static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0); 37 static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0);
38 38
39 // The roundedness of the edges of our bubble. 39 // The roundedness of the edges of our bubble.
40 static const int kBubbleCornerRadius = 4; 40 static const int kBubbleCornerRadius = 4;
41 41
42 // How close the mouse can get to the infobubble before it starts sliding 42 // How close the mouse can get to the infobubble before it starts sliding
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 void StatusBubbleViews::SetBubbleWidth(int width) { 831 void StatusBubbleViews::SetBubbleWidth(int width) {
832 size_.set_width(width); 832 size_.set_width(width);
833 SetBounds(original_position_.x(), original_position_.y(), 833 SetBounds(original_position_.x(), original_position_.y(),
834 size_.width(), size_.height()); 834 size_.width(), size_.height());
835 } 835 }
836 836
837 void StatusBubbleViews::CancelExpandTimer() { 837 void StatusBubbleViews::CancelExpandTimer() {
838 if (expand_timer_factory_.HasWeakPtrs()) 838 if (expand_timer_factory_.HasWeakPtrs())
839 expand_timer_factory_.InvalidateWeakPtrs(); 839 expand_timer_factory_.InvalidateWeakPtrs();
840 } 840 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698