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/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "chrome/browser/ui/bookmarks/bookmark_bubble_observer.h" | 9 #include "chrome/browser/ui/bookmarks/bookmark_bubble_observer.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 [parentWindow addChildWindow:window ordered:NSWindowAbove]; | 174 [parentWindow addChildWindow:window ordered:NSWindowAbove]; |
175 [window makeKeyAndOrderFront:self]; | 175 [window makeKeyAndOrderFront:self]; |
176 [self registerKeyStateEventTap]; | 176 [self registerKeyStateEventTap]; |
177 | 177 |
178 bookmarkBubbleObserver_->OnBookmarkBubbleShown(node_); | 178 bookmarkBubbleObserver_->OnBookmarkBubbleShown(node_); |
179 } | 179 } |
180 | 180 |
181 - (void)close { | 181 - (void)close { |
182 [[BrowserWindowController browserWindowControllerForWindow:self.parentWindow] | 182 [[BrowserWindowController browserWindowControllerForWindow:self.parentWindow] |
183 releaseBarVisibilityForOwner:self | 183 releaseToolbarVisibilityForOwner:self |
184 withAnimation:YES]; | 184 withAnimation:YES]; |
185 | 185 |
186 [super close]; | 186 [super close]; |
187 } | 187 } |
188 | 188 |
189 // Shows the bookmark editor sheet for more advanced editing. | 189 // Shows the bookmark editor sheet for more advanced editing. |
190 - (void)showEditor { | 190 - (void)showEditor { |
191 [self ok:self]; | 191 [self ok:self]; |
192 // Send the action up through the responder chain. | 192 // Send the action up through the responder chain. |
193 [NSApp sendAction:@selector(editBookmarkNode:) to:nil from:self]; | 193 [NSApp sendAction:@selector(editBookmarkNode:) to:nil from:self]; |
194 } | 194 } |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; | 363 NSInteger idx = [menu indexOfItemWithRepresentedObject:parentValue]; |
364 DCHECK(idx != -1); | 364 DCHECK(idx != -1); |
365 [folderPopUpButton_ selectItemAtIndex:idx]; | 365 [folderPopUpButton_ selectItemAtIndex:idx]; |
366 } | 366 } |
367 | 367 |
368 - (NSPopUpButton*)folderPopUpButton { | 368 - (NSPopUpButton*)folderPopUpButton { |
369 return folderPopUpButton_; | 369 return folderPopUpButton_; |
370 } | 370 } |
371 | 371 |
372 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) | 372 @end // implementation BookmarkBubbleController(ExposedForUnitTesting) |
OLD | NEW |