OLD | NEW |
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/chromeos/status/status_area_bubble.h" | 5 #include "chrome/browser/chromeos/status/status_area_bubble.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/window.h" | 7 #include "chrome/browser/ui/views/window.h" |
8 #include "ui/base/accessibility/accessible_view_state.h" | 8 #include "ui/base/accessibility/accessible_view_state.h" |
9 #include "ui/views/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
10 #include "ui/views/controls/label.h" | 10 #include "ui/views/controls/label.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 kPadX, kPadY, kTextPadX)); | 33 kPadX, kPadY, kTextPadX)); |
34 AddChildView(icon_view_); | 34 AddChildView(icon_view_); |
35 message_view_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 35 message_view_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
36 AddChildView(message_view_); | 36 AddChildView(message_view_); |
37 } | 37 } |
38 | 38 |
39 StatusAreaBubbleContentView::~StatusAreaBubbleContentView() { | 39 StatusAreaBubbleContentView::~StatusAreaBubbleContentView() { |
40 } | 40 } |
41 | 41 |
42 string16 StatusAreaBubbleContentView::GetMessage() const { | 42 string16 StatusAreaBubbleContentView::GetMessage() const { |
43 return message_view_->GetText(); | 43 return message_view_->text(); |
44 } | 44 } |
45 | 45 |
46 void StatusAreaBubbleContentView::SetMessage(const string16& message) { | 46 void StatusAreaBubbleContentView::SetMessage(const string16& message) { |
47 message_view_->SetText(message); | 47 message_view_->SetText(message); |
48 } | 48 } |
49 | 49 |
50 void StatusAreaBubbleContentView::GetAccessibleState( | 50 void StatusAreaBubbleContentView::GetAccessibleState( |
51 ui::AccessibleViewState* state) { | 51 ui::AccessibleViewState* state) { |
52 state->role = ui::AccessibilityTypes::ROLE_STATICTEXT; | 52 state->role = ui::AccessibilityTypes::ROLE_STATICTEXT; |
53 state->state = ui::AccessibilityTypes::STATE_READONLY; | 53 state->state = ui::AccessibilityTypes::STATE_READONLY; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 timer_.Stop(); // no-op if it's not running. | 128 timer_.Stop(); // no-op if it's not running. |
129 | 129 |
130 // Instead of setting |bubble_| NULL in OnWidgetClosing, do it here because | 130 // Instead of setting |bubble_| NULL in OnWidgetClosing, do it here because |
131 // |this| may be deleted when OnWidgetClosing is called. | 131 // |this| may be deleted when OnWidgetClosing is called. |
132 bubble_->GetWidget()->RemoveObserver(this); | 132 bubble_->GetWidget()->RemoveObserver(this); |
133 bubble_->GetWidget()->Close(); | 133 bubble_->GetWidget()->Close(); |
134 bubble_ = NULL; | 134 bubble_ = NULL; |
135 } | 135 } |
136 | 136 |
137 } // namespace chromeos | 137 } // namespace chromeos |
OLD | NEW |