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

Side by Side Diff: chrome/browser/ui/cocoa/applescript/window_applescript.mm

Issue 8949061: Move a bunch of methods from TabContents into the WebContents interface. This change either moves... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698