Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: chrome/browser/chromeos/login/webui_login_view.cc

Issue 7302015: A keyboard widget that manages itself (the animation and all that). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with trunk Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/chromeos/accessibility_util.h" 7 #include "chrome/browser/chromeos/accessibility_util.h"
8 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" 8 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
9 #include "chrome/browser/chromeos/login/webui_login_display.h" 9 #include "chrome/browser/chromeos/login/webui_login_display.h"
10 #include "chrome/browser/chromeos/status/clock_menu_button.h" 10 #include "chrome/browser/chromeos/status/clock_menu_button.h"
11 #include "chrome/browser/chromeos/status/input_method_menu_button.h" 11 #include "chrome/browser/chromeos/status/input_method_menu_button.h"
12 #include "chrome/browser/chromeos/status/network_menu_button.h" 12 #include "chrome/browser/chromeos/status/network_menu_button.h"
13 #include "chrome/browser/chromeos/status/status_area_view.h" 13 #include "chrome/browser/chromeos/status/status_area_view.h"
14 #include "chrome/browser/chromeos/wm_ipc.h" 14 #include "chrome/browser/chromeos/wm_ipc.h"
15 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/ui/views/dom_view.h" 16 #include "chrome/browser/ui/views/dom_view.h"
17 #include "content/browser/tab_contents/tab_contents.h" 17 #include "content/browser/tab_contents/tab_contents.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
20 #include "views/widget/native_widget_gtk.h" 20 #include "views/widget/native_widget_gtk.h"
21 #include "views/widget/widget.h" 21 #include "views/widget/widget.h"
22 22
23 #if defined(TOUCH_UI)
24 #include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
25 #endif
26
23 namespace { 27 namespace {
24 28
25 const char kViewClassName[] = "browser/chromeos/login/WebUILoginView"; 29 const char kViewClassName[] = "browser/chromeos/login/WebUILoginView";
26 30
27 // These strings must be kept in sync with handleAccelerator() in oobe.js. 31 // These strings must be kept in sync with handleAccelerator() in oobe.js.
28 const char kAccelNameAccessibility[] = "accessibility"; 32 const char kAccelNameAccessibility[] = "accessibility";
29 const char kAccelNameEnrollment[] = "enrollment"; 33 const char kAccelNameEnrollment[] = "enrollment";
30 34
31 } // namespace 35 } // namespace
32 36
33 namespace chromeos { 37 namespace chromeos {
34 38
35 // static 39 // static
36 const int WebUILoginView::kStatusAreaCornerPadding = 5; 40 const int WebUILoginView::kStatusAreaCornerPadding = 5;
37 41
38 // WebUILoginView public: ------------------------------------------------------ 42 // WebUILoginView public: ------------------------------------------------------
39 43
40 WebUILoginView::WebUILoginView() 44 WebUILoginView::WebUILoginView()
41 : status_area_(NULL), 45 : status_area_(NULL),
42 profile_(NULL), 46 profile_(NULL),
43 webui_login_(NULL), 47 webui_login_(NULL),
44 status_window_(NULL), 48 status_window_(NULL),
45 host_window_frozen_(false) { 49 host_window_frozen_(false) {
50 #if defined(TOUCH_UI)
51 // Make sure the singleton KeyboardManager object is created.
52 KeyboardManager::GetInstance();
53 #endif
46 accel_map_[views::Accelerator(ui::VKEY_Z, false, true, true)] = 54 accel_map_[views::Accelerator(ui::VKEY_Z, false, true, true)] =
47 kAccelNameAccessibility; 55 kAccelNameAccessibility;
48 accel_map_[views::Accelerator(ui::VKEY_E, false, true, true)] = 56 accel_map_[views::Accelerator(ui::VKEY_E, false, true, true)] =
49 kAccelNameEnrollment; 57 kAccelNameEnrollment;
50 58
51 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i) 59 for (AccelMap::iterator i(accel_map_.begin()); i != accel_map_.end(); ++i)
52 AddAccelerator(i->first); 60 AddAccelerator(i->first);
53 } 61 }
54 62
55 WebUILoginView::~WebUILoginView() { 63 WebUILoginView::~WebUILoginView() {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 GetFocusManager()); 271 GetFocusManager());
264 272
265 // Make sure error bubble is cleared on keyboard event. This is needed 273 // Make sure error bubble is cleared on keyboard event. This is needed
266 // when the focus is inside an iframe. 274 // when the focus is inside an iframe.
267 WebUI* web_ui = GetWebUI(); 275 WebUI* web_ui = GetWebUI();
268 if (web_ui) 276 if (web_ui)
269 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); 277 web_ui->CallJavascriptFunction("cr.ui.Oobe.clearErrors");
270 } 278 }
271 279
272 } // namespace chromeos 280 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_display_host.cc ('k') | chrome/browser/ui/touch/frame/keyboard_container_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698