| 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/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/webui_login_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/accessibility_util.h" | 10 #include "chrome/browser/chromeos/accessibility_util.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 kAccelNameCancel; | 116 kAccelNameCancel; |
| 117 accel_map_[views::Accelerator(ui::VKEY_E, false, true, true)] = | 117 accel_map_[views::Accelerator(ui::VKEY_E, false, true, true)] = |
| 118 kAccelNameEnrollment; | 118 kAccelNameEnrollment; |
| 119 | 119 |
| 120 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i) | 120 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i) |
| 121 AddAccelerator(i->first); | 121 AddAccelerator(i->first); |
| 122 } | 122 } |
| 123 | 123 |
| 124 WebUILoginView::~WebUILoginView() { | 124 WebUILoginView::~WebUILoginView() { |
| 125 if (status_window_) | 125 if (status_window_) |
| 126 status_window_->Close(); | 126 status_window_->CloseNow(); |
| 127 status_window_ = NULL; | 127 status_window_ = NULL; |
| 128 } | 128 } |
| 129 | 129 |
| 130 void WebUILoginView::Init() { | 130 void WebUILoginView::Init() { |
| 131 | 131 |
| 132 webui_login_ = new DOMView(); | 132 webui_login_ = new DOMView(); |
| 133 AddChildView(webui_login_); | 133 AddChildView(webui_login_); |
| 134 webui_login_->Init(ProfileManager::GetDefaultProfile(), NULL); | 134 webui_login_->Init(ProfileManager::GetDefaultProfile(), NULL); |
| 135 webui_login_->SetVisible(true); | 135 webui_login_->SetVisible(true); |
| 136 webui_login_->tab_contents()->set_delegate(this); | 136 webui_login_->tab_contents()->set_delegate(this); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 DCHECK(webui_login_); | 207 DCHECK(webui_login_); |
| 208 webui_login_->SetBoundsRect(bounds()); | 208 webui_login_->SetBoundsRect(bounds()); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void WebUILoginView::ChildPreferredSizeChanged(View* child) { | 211 void WebUILoginView::ChildPreferredSizeChanged(View* child) { |
| 212 Layout(); | 212 Layout(); |
| 213 SchedulePaint(); | 213 SchedulePaint(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 Profile* WebUILoginView::GetProfile() const { | 216 Profile* WebUILoginView::GetProfile() const { |
| 217 return ProfileManager::GetDefaultProfile(); | 217 return NULL; |
| 218 } | 218 } |
| 219 | 219 |
| 220 void WebUILoginView::ExecuteBrowserCommand(int id) const { | 220 void WebUILoginView::ExecuteBrowserCommand(int id) const { |
| 221 } | 221 } |
| 222 | 222 |
| 223 bool WebUILoginView::ShouldOpenButtonOptions( | 223 bool WebUILoginView::ShouldOpenButtonOptions( |
| 224 const views::View* button_view) const { | 224 const views::View* button_view) const { |
| 225 if (button_view == status_area_->network_view()) | 225 if (button_view == status_area_->network_view()) |
| 226 return true; | 226 return true; |
| 227 | 227 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 GetFocusManager()); | 354 GetFocusManager()); |
| 355 | 355 |
| 356 // Make sure error bubble is cleared on keyboard event. This is needed | 356 // Make sure error bubble is cleared on keyboard event. This is needed |
| 357 // when the focus is inside an iframe. | 357 // when the focus is inside an iframe. |
| 358 WebUI* web_ui = GetWebUI(); | 358 WebUI* web_ui = GetWebUI(); |
| 359 if (web_ui) | 359 if (web_ui) |
| 360 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 360 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace chromeos | 363 } // namespace chromeos |
| OLD | NEW |