| 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" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 StatusView(StatusBubble* status_bubble, views::WidgetWin* popup) | 72 StatusView(StatusBubble* status_bubble, views::WidgetWin* popup) |
| 73 : Animation(kFramerate, this), | 73 : Animation(kFramerate, this), |
| 74 status_bubble_(status_bubble), | 74 status_bubble_(status_bubble), |
| 75 popup_(popup), | 75 popup_(popup), |
| 76 stage_(BUBBLE_HIDDEN), | 76 stage_(BUBBLE_HIDDEN), |
| 77 style_(STYLE_STANDARD), | 77 style_(STYLE_STANDARD), |
| 78 timer_factory_(this), | 78 timer_factory_(this), |
| 79 opacity_start_(0), | 79 opacity_start_(0), |
| 80 opacity_end_(0) { | 80 opacity_end_(0) { |
| 81 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 81 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 82 ChromeFont font(rb.GetFont(ResourceBundle::BaseFont)); | 82 gfx::Font font(rb.GetFont(ResourceBundle::BaseFont)); |
| 83 SetFont(font); | 83 SetFont(font); |
| 84 } | 84 } |
| 85 | 85 |
| 86 ~StatusView() { | 86 ~StatusView() { |
| 87 Stop(); | 87 Stop(); |
| 88 CancelTimer(); | 88 CancelTimer(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 // The bubble can be in one of many stages: | 91 // The bubble can be in one of many stages: |
| 92 typedef enum BubbleStage { | 92 typedef enum BubbleStage { |
| (...skipping 529 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 |