| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/web_page_view.h" | 5 #include "chrome/browser/chromeos/login/web_page_view.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 void WebPageView::ShowWaitingControls() { | 169 void WebPageView::ShowWaitingControls() { |
| 170 throbber_->Start(); | 170 throbber_->Start(); |
| 171 connecting_label_->SetVisible(true); | 171 connecting_label_->SetVisible(true); |
| 172 } | 172 } |
| 173 | 173 |
| 174 /////////////////////////////////////////////////////////////////////////////// | 174 /////////////////////////////////////////////////////////////////////////////// |
| 175 // WebPageView, views::View implementation: | 175 // WebPageView, views::View implementation: |
| 176 | 176 |
| 177 void WebPageView::Layout() { | 177 void WebPageView::Layout() { |
| 178 dom_view()->SetBoundsRect(GetLocalBounds()); | 178 dom_view()->SetBoundsRect(GetContentsBounds()); |
| 179 int y = height() / 2 - throbber_->GetPreferredSize().height() / 2; | 179 int y = height() / 2 - throbber_->GetPreferredSize().height() / 2; |
| 180 throbber_->SetBounds( | 180 throbber_->SetBounds( |
| 181 width() / 2 - throbber_->GetPreferredSize().width() / 2, | 181 width() / 2 - throbber_->GetPreferredSize().width() / 2, |
| 182 y, | 182 y, |
| 183 throbber_->GetPreferredSize().width(), | 183 throbber_->GetPreferredSize().width(), |
| 184 throbber_->GetPreferredSize().height()); | 184 throbber_->GetPreferredSize().height()); |
| 185 connecting_label_->SetBounds( | 185 connecting_label_->SetBounds( |
| 186 width() / 2 - connecting_label_->GetPreferredSize().width() / 2, | 186 width() / 2 - connecting_label_->GetPreferredSize().width() / 2, |
| 187 y + throbber_->GetPreferredSize().height() + kSpacing, | 187 y + throbber_->GetPreferredSize().height() + kSpacing, |
| 188 connecting_label_->GetPreferredSize().width(), | 188 connecting_label_->GetPreferredSize().width(), |
| 189 connecting_label_->GetPreferredSize().height()); | 189 connecting_label_->GetPreferredSize().height()); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace chromeos | 192 } // namespace chromeos |
| OLD | NEW |