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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 status_view_->SchedulePaint(); | 541 status_view_->SchedulePaint(); |
542 } | 542 } |
543 | 543 |
544 // StatusBubble --------------------------------------------------------------- | 544 // StatusBubble --------------------------------------------------------------- |
545 | 545 |
546 const int StatusBubbleViews::kShadowThickness = 1; | 546 const int StatusBubbleViews::kShadowThickness = 1; |
547 | 547 |
548 StatusBubbleViews::StatusBubbleViews(views::View* base_view) | 548 StatusBubbleViews::StatusBubbleViews(views::View* base_view) |
549 : contains_mouse_(false), | 549 : contains_mouse_(false), |
550 offset_(0), | 550 offset_(0), |
551 popup_(NULL), | |
552 opacity_(0), | 551 opacity_(0), |
553 base_view_(base_view), | 552 base_view_(base_view), |
554 view_(NULL), | 553 view_(NULL), |
555 download_shelf_is_visible_(false), | 554 download_shelf_is_visible_(false), |
556 is_expanded_(false), | 555 is_expanded_(false), |
557 expand_timer_factory_(this) { | 556 expand_timer_factory_(this) { |
558 expand_view_.reset(); | 557 expand_view_.reset(); |
559 } | 558 } |
560 | 559 |
561 StatusBubbleViews::~StatusBubbleViews() { | 560 StatusBubbleViews::~StatusBubbleViews() { |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 void StatusBubbleViews::SetBubbleWidth(int width) { | 844 void StatusBubbleViews::SetBubbleWidth(int width) { |
846 size_.set_width(width); | 845 size_.set_width(width); |
847 SetBounds(original_position_.x(), original_position_.y(), | 846 SetBounds(original_position_.x(), original_position_.y(), |
848 size_.width(), size_.height()); | 847 size_.width(), size_.height()); |
849 } | 848 } |
850 | 849 |
851 void StatusBubbleViews::CancelExpandTimer() { | 850 void StatusBubbleViews::CancelExpandTimer() { |
852 if (expand_timer_factory_.HasWeakPtrs()) | 851 if (expand_timer_factory_.HasWeakPtrs()) |
853 expand_timer_factory_.InvalidateWeakPtrs(); | 852 expand_timer_factory_.InvalidateWeakPtrs(); |
854 } | 853 } |
OLD | NEW |