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

Side by Side Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 10073014: Add more functionality to WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "content/browser/web_contents/web_contents_view_mac.h" 7 #import "content/browser/web_contents/web_contents_view_mac.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 [[NSNotificationCenter defaultCenter] 404 [[NSNotificationCenter defaultCenter]
405 addObserver:self 405 addObserver:self
406 selector:@selector(viewDidBecomeFirstResponder:) 406 selector:@selector(viewDidBecomeFirstResponder:)
407 name:kViewDidBecomeFirstResponder 407 name:kViewDidBecomeFirstResponder
408 object:nil]; 408 object:nil];
409 409
410 if (webContentsView_->delegate()) { 410 if (webContentsView_->delegate()) {
411 [dragDest_ setDragDelegate:webContentsView_->delegate()-> 411 [dragDest_ setDragDelegate:webContentsView_->delegate()->
412 GetDragDestDelegate()]; 412 GetDragDestDelegate()];
413 webContentsView_->delegate()->NativeViewCreated(self);
414 } 413 }
415 } 414 }
416 return self; 415 return self;
417 } 416 }
418 417
419 - (void)dealloc { 418 - (void)dealloc {
420 if (webContentsView_ && webContentsView_->delegate())
421 webContentsView_->delegate()->NativeViewDestroyed(self);
422
423 // Cancel any deferred tab closes, just in case. 419 // Cancel any deferred tab closes, just in case.
424 [self cancelDeferredClose]; 420 [self cancelDeferredClose];
425 421
426 // This probably isn't strictly necessary, but can't hurt. 422 // This probably isn't strictly necessary, but can't hurt.
427 [self unregisterDraggedTypes]; 423 [self unregisterDraggedTypes];
428 424
429 [[NSNotificationCenter defaultCenter] removeObserver:self]; 425 [[NSNotificationCenter defaultCenter] removeObserver:self];
430 426
431 [super dealloc]; 427 [super dealloc];
432 } 428 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 [[[notification userInfo] objectForKey:kSelectionDirection] 570 [[[notification userInfo] objectForKey:kSelectionDirection]
575 unsignedIntegerValue]; 571 unsignedIntegerValue];
576 if (direction == NSDirectSelection) 572 if (direction == NSDirectSelection)
577 return; 573 return;
578 574
579 [self webContents]-> 575 [self webContents]->
580 FocusThroughTabTraversal(direction == NSSelectingPrevious); 576 FocusThroughTabTraversal(direction == NSSelectingPrevious);
581 } 577 }
582 578
583 @end 579 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698