| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/status_bubble_views.h" | 5 #include "chrome/browser/views/status_bubble_views.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/gfx/chrome_canvas.h" | 9 #include "app/gfx/chrome_canvas.h" |
| 10 #include "app/gfx/text_elider.h" | 10 #include "app/gfx/text_elider.h" |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/l10n_util_win.h" | 12 #include "app/l10n_util_win.h" |
| 13 #include "app/animation.h" | 13 #include "app/animation.h" |
| 14 #include "app/resource_bundle.h" | 14 #include "app/resource_bundle.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
| 19 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
| 20 #include "skia/include/SkPaint.h" | 20 #include "third_party/skia/include/core/SkPaint.h" |
| 21 #include "skia/include/SkPath.h" | 21 #include "third_party/skia/include/core/SkPath.h" |
| 22 #include "skia/include/corecg/SkRect.h" | 22 #include "third_party/skia/include/core/SkRect.h" |
| 23 #include "views/controls/label.h" | 23 #include "views/controls/label.h" |
| 24 #include "views/widget/root_view.h" | 24 #include "views/widget/root_view.h" |
| 25 #include "views/widget/widget_win.h" | 25 #include "views/widget/widget_win.h" |
| 26 | 26 |
| 27 // The color of the background bubble. | 27 // The color of the background bubble. |
| 28 static const SkColor kBubbleColor = SkColorSetRGB(222, 234, 248); | 28 static const SkColor kBubbleColor = SkColorSetRGB(222, 234, 248); |
| 29 | 29 |
| 30 // The alpha and color of the bubble's shadow. | 30 // The alpha and color of the bubble's shadow. |
| 31 static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0); | 31 static const SkColor kShadowColor = SkColorSetARGB(30, 0, 0, 0); |
| 32 | 32 |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 frame_->GetBounds(&frame_bounds, false); | 622 frame_->GetBounds(&frame_bounds, false); |
| 623 int mirrored_x = frame_bounds.width() - x - w; | 623 int mirrored_x = frame_bounds.width() - x - w; |
| 624 position_.SetPoint(mirrored_x, y); | 624 position_.SetPoint(mirrored_x, y); |
| 625 } else { | 625 } else { |
| 626 position_.SetPoint(x, y); | 626 position_.SetPoint(x, y); |
| 627 } | 627 } |
| 628 | 628 |
| 629 size_.SetSize(w, h); | 629 size_.SetSize(w, h); |
| 630 Reposition(); | 630 Reposition(); |
| 631 } | 631 } |
| OLD | NEW |