OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/applescript/window_applescript.h" | 5 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #import "base/memory/scoped_nsobject.h" | 8 #import "base/memory/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 property:AppleScript::kTabsProperty]; | 144 property:AppleScript::kTabsProperty]; |
145 return currentTab; | 145 return currentTab; |
146 } | 146 } |
147 | 147 |
148 - (NSArray*)tabs { | 148 - (NSArray*)tabs { |
149 NSMutableArray* tabs = [NSMutableArray | 149 NSMutableArray* tabs = [NSMutableArray |
150 arrayWithCapacity:browser_->tab_count()]; | 150 arrayWithCapacity:browser_->tab_count()]; |
151 | 151 |
152 for (int i = 0; i < browser_->tab_count(); ++i) { | 152 for (int i = 0; i < browser_->tab_count(); ++i) { |
153 // Check to see if tab is closing. | 153 // Check to see if tab is closing. |
154 if (browser_->GetTabContentsAt(i)->is_being_destroyed()) { | 154 if (browser_->GetTabContentsAt(i)->IsBeingDestroyed()) { |
155 continue; | 155 continue; |
156 } | 156 } |
157 | 157 |
158 scoped_nsobject<TabAppleScript> tab( | 158 scoped_nsobject<TabAppleScript> tab( |
159 [[TabAppleScript alloc] | 159 [[TabAppleScript alloc] |
160 initWithTabContent:(browser_->GetTabContentsWrapperAt(i))]); | 160 initWithTabContent:(browser_->GetTabContentsWrapperAt(i))]); |
161 [tab setContainer:self | 161 [tab setContainer:self |
162 property:AppleScript::kTabsProperty]; | 162 property:AppleScript::kTabsProperty]; |
163 [tabs addObject:tab]; | 163 [tabs addObject:tab]; |
164 } | 164 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION); | 257 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION); |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
261 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { | 261 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { |
262 if (browser_->window()) | 262 if (browser_->window()) |
263 browser_->window()->ExitPresentationMode(); | 263 browser_->window()->ExitPresentationMode(); |
264 } | 264 } |
265 | 265 |
266 @end | 266 @end |
OLD | NEW |