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/login/message_bubble.h" | 5 #include "chrome/browser/chromeos/login/message_bubble.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/chromeos/login/helper.h" | 10 #include "chrome/browser/chromeos/login/helper.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 namespace chromeos { | 28 namespace chromeos { |
29 | 29 |
30 MessageBubble::MessageBubble(views::View* anchor_view, | 30 MessageBubble::MessageBubble(views::View* anchor_view, |
31 views::BubbleBorder::ArrowLocation arrow_location, | 31 views::BubbleBorder::ArrowLocation arrow_location, |
32 SkBitmap* image, | 32 SkBitmap* image, |
33 const string16& text, | 33 const string16& text, |
34 const std::vector<string16>& links) | 34 const std::vector<string16>& links) |
35 : BubbleDelegateView(anchor_view, arrow_location, kBackgroundColor), | 35 : BubbleDelegateView(anchor_view, arrow_location), |
36 image_(image), | 36 image_(image), |
37 text_(text), | 37 text_(text), |
38 close_button_(NULL), | 38 close_button_(NULL), |
39 link_listener_(NULL) { | 39 link_listener_(NULL) { |
40 set_use_focusless(true); | 40 set_use_focusless(true); |
41 for (size_t i = 0; i < links.size(); ++i) | 41 for (size_t i = 0; i < links.size(); ++i) |
42 help_links_.push_back(new views::Link(links[i])); | 42 help_links_.push_back(new views::Link(links[i])); |
43 } | 43 } |
44 | 44 |
45 MessageBubble::~MessageBubble() { | 45 MessageBubble::~MessageBubble() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 for (size_t i = 0; i < help_links_.size(); ++i) { | 114 for (size_t i = 0; i < help_links_.size(); ++i) { |
115 if (source == help_links_[i]) { | 115 if (source == help_links_[i]) { |
116 link_listener_->OnLinkActivated(i); | 116 link_listener_->OnLinkActivated(i); |
117 return; | 117 return; |
118 } | 118 } |
119 } | 119 } |
120 NOTREACHED() << "Unknown view"; | 120 NOTREACHED() << "Unknown view"; |
121 } | 121 } |
122 | 122 |
123 } // namespace chromeos | 123 } // namespace chromeos |
OLD | NEW |