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/touch_login_view.h" | 5 #include "chrome/browser/chromeos/login/touch_login_view.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/status/status_area_view.h" | 7 #include "chrome/browser/chromeos/status/status_area_view.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" | 9 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" |
10 #include "chrome/browser/ui/touch/frame/keyboard_container_view.h" | 10 #include "chrome/browser/ui/touch/frame/keyboard_container_view.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 TouchLoginView::~TouchLoginView() { | 51 TouchLoginView::~TouchLoginView() { |
52 } | 52 } |
53 | 53 |
54 void TouchLoginView::Init() { | 54 void TouchLoginView::Init() { |
55 WebUILoginView::Init(); | 55 WebUILoginView::Init(); |
56 InitStatusArea(); | 56 InitStatusArea(); |
57 InitVirtualKeyboard(); | 57 InitVirtualKeyboard(); |
58 | 58 |
| 59 |
| 60 Source<TabContents> tab_contents(webui_login_->tab_contents())); |
59 registrar_.Add(this, | 61 registrar_.Add(this, |
60 content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, | 62 content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, |
61 NotificationService::AllSources()); | 63 tab_contents); |
62 registrar_.Add(this, | 64 registrar_.Add(this, |
63 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, | 65 content::NOTIFICATION_TAB_CONTENTS_DESTROYED, |
64 NotificationService::AllSources()); | 66 tab_contents); |
65 registrar_.Add(this, | 67 registrar_.Add(this, |
66 chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED, | 68 chrome::NOTIFICATION_HIDE_KEYBOARD_INVOKED, |
67 NotificationService::AllSources()); | 69 NotificationService::AllSources()); |
68 registrar_.Add(this, | 70 registrar_.Add(this, |
69 chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED, | 71 chrome::NOTIFICATION_SET_KEYBOARD_HEIGHT_INVOKED, |
70 NotificationService::AllSources()); | 72 NotificationService::AllSources()); |
71 } | 73 } |
72 | 74 |
73 std::string TouchLoginView::GetClassName() const { | 75 std::string TouchLoginView::GetClassName() const { |
74 return kViewClassName; | 76 return kViewClassName; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 void TouchLoginView::AnimationEnded(const ui::Animation* animation) { | 226 void TouchLoginView::AnimationEnded(const ui::Animation* animation) { |
225 if (keyboard_showing_) { | 227 if (keyboard_showing_) { |
226 Layout(); | 228 Layout(); |
227 } else { | 229 } else { |
228 // Notify the keyboard that it is hidden now. | 230 // Notify the keyboard that it is hidden now. |
229 keyboard_->SetVisible(false); | 231 keyboard_->SetVisible(false); |
230 } | 232 } |
231 } | 233 } |
232 | 234 |
233 } // namespace chromeos | 235 } // namespace chromeos |
OLD | NEW |