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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 8026: Remove WebKeyboardEvent::key_data because we don't actually use it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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
« no previous file with comments | « webkit/glue/webinputevent_win.cc ('k') | webkit/tools/test_shell/event_sending_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 Google Inc. All Rights Reserved. 2 * Copyright 2007 Google Inc. All Rights Reserved.
3 * 3 *
4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 void WebViewImpl::SetInitialFocus(bool reverse) { 1007 void WebViewImpl::SetInitialFocus(bool reverse) {
1008 if (page_.get()) { 1008 if (page_.get()) {
1009 // So RestoreFocus does not focus anything when it is called. 1009 // So RestoreFocus does not focus anything when it is called.
1010 ReleaseFocusReferences(); 1010 ReleaseFocusReferences();
1011 1011
1012 // Since we don't have a keyboard event, we'll create one. 1012 // Since we don't have a keyboard event, we'll create one.
1013 WebKeyboardEvent keyboard_event; 1013 WebKeyboardEvent keyboard_event;
1014 keyboard_event.type = WebInputEvent::KEY_DOWN; 1014 keyboard_event.type = WebInputEvent::KEY_DOWN;
1015 if (reverse) 1015 if (reverse)
1016 keyboard_event.modifiers = WebInputEvent::SHIFT_KEY; 1016 keyboard_event.modifiers = WebInputEvent::SHIFT_KEY;
1017 #if defined(OS_WIN) 1017 // VK_TAB which is only defined on Windows.
1018 keyboard_event.key_code = VK_TAB; 1018 keyboard_event.key_code = 0x09;
1019 #endif
1020 keyboard_event.key_data = L'\t';
1021 MakePlatformKeyboardEvent platform_event(keyboard_event); 1019 MakePlatformKeyboardEvent platform_event(keyboard_event);
1022 // We have to set the key type explicitly to avoid an assert in the 1020 // We have to set the key type explicitly to avoid an assert in the
1023 // KeyboardEvent constructor. 1021 // KeyboardEvent constructor.
1024 platform_event.SetKeyType(PlatformKeyboardEvent::RawKeyDown); 1022 platform_event.SetKeyType(PlatformKeyboardEvent::RawKeyDown);
1025 RefPtr<KeyboardEvent> webkit_event = KeyboardEvent::create(platform_event, N ULL); 1023 RefPtr<KeyboardEvent> webkit_event = KeyboardEvent::create(platform_event, N ULL);
1026 page()->focusController()->setInitialFocus( 1024 page()->focusController()->setInitialFocus(
1027 reverse ? WebCore::FocusDirectionBackward : 1025 reverse ? WebCore::FocusDirectionBackward :
1028 WebCore::FocusDirectionForward, 1026 WebCore::FocusDirectionForward,
1029 webkit_event.get()); 1027 webkit_event.get());
1030 } 1028 }
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 } 1541 }
1544 1542
1545 void WebViewImpl::DeleteImageResourceFetcher(ImageResourceFetcher* fetcher) { 1543 void WebViewImpl::DeleteImageResourceFetcher(ImageResourceFetcher* fetcher) {
1546 DCHECK(image_fetchers_.find(fetcher) != image_fetchers_.end()); 1544 DCHECK(image_fetchers_.find(fetcher) != image_fetchers_.end());
1547 image_fetchers_.erase(fetcher); 1545 image_fetchers_.erase(fetcher);
1548 1546
1549 // We're in the callback from the ImageResourceFetcher, best to delay 1547 // We're in the callback from the ImageResourceFetcher, best to delay
1550 // deletion. 1548 // deletion.
1551 MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher); 1549 MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher);
1552 } 1550 }
OLDNEW
« no previous file with comments | « webkit/glue/webinputevent_win.cc ('k') | webkit/tools/test_shell/event_sending_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698