| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/applescript/browsercrapplication+applescript.h" | 5 #import "chrome/browser/cocoa/applescript/browsercrapplication+applescript.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "base/scoped_nsobject.h" | 8 #import "base/scoped_nsobject.h" |
| 9 #import "chrome/browser/app_controller_mac.h" | 9 #import "chrome/browser/app_controller_mac.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 arrayWithCapacity:BrowserList::size()]; | 22 arrayWithCapacity:BrowserList::size()]; |
| 23 // Iterate through all browsers and check if it closing, | 23 // Iterate through all browsers and check if it closing, |
| 24 // if not add it to list. | 24 // if not add it to list. |
| 25 for (BrowserList::const_iterator browserIterator = BrowserList::begin(); | 25 for (BrowserList::const_iterator browserIterator = BrowserList::begin(); |
| 26 browserIterator != BrowserList::end(); ++browserIterator) { | 26 browserIterator != BrowserList::end(); ++browserIterator) { |
| 27 if ((*browserIterator)->IsAttemptingToCloseBrowser()) | 27 if ((*browserIterator)->IsAttemptingToCloseBrowser()) |
| 28 continue; | 28 continue; |
| 29 | 29 |
| 30 scoped_nsobject<WindowAppleScript> window( | 30 scoped_nsobject<WindowAppleScript> window( |
| 31 [[WindowAppleScript alloc] initWithBrowser:*browserIterator]); | 31 [[WindowAppleScript alloc] initWithBrowser:*browserIterator]); |
| 32 [window setContainer:NSApp |
| 33 property:AppleScript::kWindowsProperty]; |
| 32 [appleScriptWindows addObject:window]; | 34 [appleScriptWindows addObject:window]; |
| 33 } | 35 } |
| 34 // Windows sorted by their index value, which is obtained by calling | 36 // Windows sorted by their index value, which is obtained by calling |
| 35 // orderedIndex: on each window. | 37 // orderedIndex: on each window. |
| 36 [appleScriptWindows sortUsingSelector:@selector(windowComparator:)]; | 38 [appleScriptWindows sortUsingSelector:@selector(windowComparator:)]; |
| 37 return appleScriptWindows; | 39 return appleScriptWindows; |
| 38 } | 40 } |
| 39 | 41 |
| 40 - (void)insertInAppleScriptWindows:(WindowAppleScript*)aWindow { | 42 - (void)insertInAppleScriptWindows:(WindowAppleScript*)aWindow { |
| 41 // This method gets called when a new window is created so | 43 // This method gets called when a new window is created so |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 127 |
| 126 - (void)insertInBookmarksFolders:(id)aBookmarkFolder atIndex:(int)index { | 128 - (void)insertInBookmarksFolders:(id)aBookmarkFolder atIndex:(int)index { |
| 127 NOTIMPLEMENTED(); | 129 NOTIMPLEMENTED(); |
| 128 } | 130 } |
| 129 | 131 |
| 130 - (void)removeFromBookmarksFoldersAtIndex:(int)index { | 132 - (void)removeFromBookmarksFoldersAtIndex:(int)index { |
| 131 NOTIMPLEMENTED(); | 133 NOTIMPLEMENTED(); |
| 132 } | 134 } |
| 133 | 135 |
| 134 @end | 136 @end |
| OLD | NEW |