OLD | NEW |
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 "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h" |
6 | 6 |
7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 self, | 214 self, |
215 @selector(dismissWithoutEditing:))); | 215 @selector(dismissWithoutEditing:))); |
216 chrome_observer_.reset(new BookmarkBubbleNotificationBridge( | 216 chrome_observer_.reset(new BookmarkBubbleNotificationBridge( |
217 self, @selector(dismissWithoutEditing:))); | 217 self, @selector(dismissWithoutEditing:))); |
218 | 218 |
219 // Pulse something interesting on the bookmark bar. | 219 // Pulse something interesting on the bookmark bar. |
220 [self startPulsingBookmarkButton:node_]; | 220 [self startPulsingBookmarkButton:node_]; |
221 | 221 |
222 [parentWindow addChildWindow:window ordered:NSWindowAbove]; | 222 [parentWindow addChildWindow:window ordered:NSWindowAbove]; |
223 [window makeKeyAndOrderFront:self]; | 223 [window makeKeyAndOrderFront:self]; |
| 224 [self registerKeyStateEventTap]; |
224 } | 225 } |
225 | 226 |
226 - (void)close { | 227 - (void)close { |
227 [[BrowserWindowController browserWindowControllerForWindow:self.parentWindow] | 228 [[BrowserWindowController browserWindowControllerForWindow:self.parentWindow] |
228 releaseBarVisibilityForOwner:self withAnimation:YES delay:NO]; | 229 releaseBarVisibilityForOwner:self withAnimation:YES delay:NO]; |
229 | 230 |
230 [super close]; | 231 [super close]; |
231 } | 232 } |
232 | 233 |
233 // Shows the bookmark editor sheet for more advanced editing. | 234 // Shows the bookmark editor sheet for more advanced editing. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; | 400 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; |
400 DCHECK(idx != -1); | 401 DCHECK(idx != -1); |
401 [folderPopUpButton_ selectItemAtIndex:idx]; | 402 [folderPopUpButton_ selectItemAtIndex:idx]; |
402 } | 403 } |
403 | 404 |
404 - (NSPopUpButton*)folderPopUpButton { | 405 - (NSPopUpButton*)folderPopUpButton { |
405 return folderPopUpButton_; | 406 return folderPopUpButton_; |
406 } | 407 } |
407 | 408 |
408 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) | 409 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) |
OLD | NEW |