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

Side by Side Diff: chrome/browser/cocoa/bookmark_bar_controller.mm

Issue 1585010: Fix bookmarks on subfolder. Introduced with http://codereview.chromium.org/1... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
« no previous file with comments | « no previous file | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/cocoa/bookmark_bar_controller.h" 5 #import "chrome/browser/cocoa/bookmark_bar_controller.h"
6 #include "app/l10n_util_mac.h" 6 #include "app/l10n_util_mac.h"
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // counted as "outside" as well, because they should close bookmark folder 512 // counted as "outside" as well, because they should close bookmark folder
513 // menus as well. 513 // menus as well.
514 if (eventWindow == myWindow) { 514 if (eventWindow == myWindow) {
515 NSView* hitView = 515 NSView* hitView =
516 [[eventWindow contentView] hitTest:[event locationInWindow]]; 516 [[eventWindow contentView] hitTest:[event locationInWindow]];
517 if (![hitView isDescendantOf:[self view]] || hitView == buttonView_) 517 if (![hitView isDescendantOf:[self view]] || hitView == buttonView_)
518 return YES; 518 return YES;
519 } 519 }
520 // If a click in a bookmark bar folder window and that isn't 520 // If a click in a bookmark bar folder window and that isn't
521 // one of my bookmark bar folders, YES is click outside. 521 // one of my bookmark bar folders, YES is click outside.
522 if ([eventWindow isKindOfClass:[BookmarkBarFolderWindow 522 if (![eventWindow isKindOfClass:[BookmarkBarFolderWindow
523 class]] && 523 class]]) {
524 [eventWindow parentWindow] != myWindow) {
525 return YES; 524 return YES;
526 } 525 }
527 break; 526 break;
528 default: 527 default:
529 break; 528 break;
530 } 529 }
531 return NO; 530 return NO;
532 } 531 }
533 532
534 // Exposed for testing. 533 // Exposed for testing.
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 [pboard addTypes:[NSArray arrayWithObject:kBookmarkButtonDragType] 1922 [pboard addTypes:[NSArray arrayWithObject:kBookmarkButtonDragType]
1924 owner:nil]; 1923 owner:nil];
1925 [pboard setData:[NSData dataWithBytes:&button length:sizeof(button)] 1924 [pboard setData:[NSData dataWithBytes:&button length:sizeof(button)]
1926 forType:kBookmarkButtonDragType]; 1925 forType:kBookmarkButtonDragType];
1927 } else { 1926 } else {
1928 NOTREACHED(); 1927 NOTREACHED();
1929 } 1928 }
1930 } 1929 }
1931 1930
1932 @end 1931 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698