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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 460105: Fix issue 23221: accesskey is not supported on Chromium Mac.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years 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 | « chrome/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h" 7 #include "chrome/browser/tab_contents/tab_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 - (void)setCurrentDragOperation:(NSDragOperation)operation { 350 - (void)setCurrentDragOperation:(NSDragOperation)operation {
351 [dropTarget_ setCurrentOperation:operation]; 351 [dropTarget_ setCurrentOperation:operation];
352 } 352 }
353 353
354 - (TabContents*)tabContents { 354 - (TabContents*)tabContents {
355 return tabContentsView_->tab_contents(); 355 return tabContentsView_->tab_contents();
356 } 356 }
357 357
358 - (BOOL)processKeyboardEvent:(NativeWebKeyboardEvent*)wkEvent { 358 - (BOOL)processKeyboardEvent:(NativeWebKeyboardEvent*)wkEvent {
359 if (wkEvent->skip_in_browser) 359 if (wkEvent->skip_in_browser || wkEvent->type == WebKit::WebInputEvent::Char)
360 return NO; 360 return NO;
361 361
362 NSEvent* event = wkEvent->os_event; 362 NSEvent* event = wkEvent->os_event;
363 363 DCHECK(event != NULL);
364 if (!event) {
365 // Char events are synthesized and do not contain a real event. We are not
366 // interested in them anyway.
367 DCHECK(wkEvent->type == WebKit::WebInputEvent::Char);
368 return NO;
369 }
370 364
371 // If this tab is no longer active, its window will be |nil|. In that case, 365 // If this tab is no longer active, its window will be |nil|. In that case,
372 // best ignore the event. 366 // best ignore the event.
373 if (![self window]) 367 if (![self window])
374 return NO; 368 return NO;
375 ChromeEventProcessingWindow* window = 369 ChromeEventProcessingWindow* window =
376 (ChromeEventProcessingWindow*)[self window]; 370 (ChromeEventProcessingWindow*)[self window];
377 DCHECK([window isKindOfClass:[ChromeEventProcessingWindow class]]); 371 DCHECK([window isKindOfClass:[ChromeEventProcessingWindow class]]);
378 372
379 // Do not fire shortcuts on key up. 373 // Do not fire shortcuts on key up.
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 528 }
535 529
536 - (void)closeTabAfterEvent { 530 - (void)closeTabAfterEvent {
537 tabContentsView_->CloseTab(); 531 tabContentsView_->CloseTab();
538 } 532 }
539 533
540 // Tons of stuff goes here, where we grab events going on in Cocoaland and send 534 // Tons of stuff goes here, where we grab events going on in Cocoaland and send
541 // them into the C++ system. TODO(avi): all that jazz 535 // them into the C++ system. TODO(avi): all that jazz
542 536
543 @end 537 @end
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698