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