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/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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 layout->StartRowWithPadding(0, 1, 0, kBorderSize); | 92 layout->StartRowWithPadding(0, 1, 0, kBorderSize); |
93 views::Link* help_link = help_links_[i]; | 93 views::Link* help_link = help_links_[i]; |
94 help_link->set_listener(this); | 94 help_link->set_listener(this); |
95 help_link->SetEnabledColor(login::kLinkColor); | 95 help_link->SetEnabledColor(login::kLinkColor); |
96 help_link->SetPressedColor(login::kLinkColor); | 96 help_link->SetPressedColor(login::kLinkColor); |
97 layout->AddView(help_link); | 97 layout->AddView(help_link); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 void MessageBubble::ButtonPressed(views::Button* sender, | 101 void MessageBubble::ButtonPressed(views::Button* sender, |
102 const views::Event& event) { | 102 const ui::Event& event) { |
103 if (sender == close_button_) { | 103 if (sender == close_button_) { |
104 GetWidget()->Close(); | 104 GetWidget()->Close(); |
105 } else { | 105 } else { |
106 NOTREACHED() << "Unknown view"; | 106 NOTREACHED() << "Unknown view"; |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 void MessageBubble::LinkClicked(views::Link* source, int event_flags) { | 110 void MessageBubble::LinkClicked(views::Link* source, int event_flags) { |
111 if (!link_listener_) | 111 if (!link_listener_) |
112 return; | 112 return; |
113 for (size_t i = 0; i < help_links_.size(); ++i) { | 113 for (size_t i = 0; i < help_links_.size(); ++i) { |
114 if (source == help_links_[i]) { | 114 if (source == help_links_[i]) { |
115 link_listener_->OnLinkActivated(i); | 115 link_listener_->OnLinkActivated(i); |
116 return; | 116 return; |
117 } | 117 } |
118 } | 118 } |
119 NOTREACHED() << "Unknown view"; | 119 NOTREACHED() << "Unknown view"; |
120 } | 120 } |
121 | 121 |
122 } // namespace chromeos | 122 } // namespace chromeos |
OLD | NEW |