OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/extensions/extension_message_bubble_view.h" | 5 #include "chrome/browser/ui/views/extensions/extension_message_bubble_view.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // How long to wait until showing the bubble (in seconds). | 37 // How long to wait until showing the bubble (in seconds). |
38 int g_bubble_appearance_wait_time = 5; | 38 int g_bubble_appearance_wait_time = 5; |
39 | 39 |
40 } // namespace | 40 } // namespace |
41 | 41 |
42 namespace extensions { | 42 namespace extensions { |
43 | 43 |
44 ExtensionMessageBubbleView::ExtensionMessageBubbleView( | 44 ExtensionMessageBubbleView::ExtensionMessageBubbleView( |
45 views::View* anchor_view, | 45 views::View* anchor_view, |
46 views::BubbleBorder::Arrow arrow_location, | 46 views::BubbleBorder::Arrow arrow_location, |
47 scoped_ptr<extensions::ExtensionMessageBubbleController> controller) | 47 std::unique_ptr<extensions::ExtensionMessageBubbleController> controller) |
48 : BubbleDelegateView(anchor_view, arrow_location), | 48 : BubbleDelegateView(anchor_view, arrow_location), |
49 controller_(std::move(controller)), | 49 controller_(std::move(controller)), |
50 anchor_view_(anchor_view), | 50 anchor_view_(anchor_view), |
51 headline_(NULL), | 51 headline_(NULL), |
52 learn_more_(NULL), | 52 learn_more_(NULL), |
53 dismiss_button_(NULL), | 53 dismiss_button_(NULL), |
54 link_clicked_(false), | 54 link_clicked_(false), |
55 action_taken_(false), | 55 action_taken_(false), |
56 weak_factory_(this) { | 56 weak_factory_(this) { |
57 DCHECK(anchor_view->GetWidget()); | 57 DCHECK(anchor_view->GetWidget()); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 state->role = ui::AX_ROLE_ALERT; | 228 state->role = ui::AX_ROLE_ALERT; |
229 } | 229 } |
230 | 230 |
231 void ExtensionMessageBubbleView::ViewHierarchyChanged( | 231 void ExtensionMessageBubbleView::ViewHierarchyChanged( |
232 const ViewHierarchyChangedDetails& details) { | 232 const ViewHierarchyChangedDetails& details) { |
233 if (details.is_add && details.child == this) | 233 if (details.is_add && details.child == this) |
234 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); | 234 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
235 } | 235 } |
236 | 236 |
237 } // namespace extensions | 237 } // namespace extensions |
OLD | NEW |