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

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

Issue 6307006: Quick simple cleanup changes to TabContentsWrapper.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 months 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
« no previous file with comments | « no previous file | chrome/browser/ui/tab_contents/tab_contents_wrapper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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/scoped_nsobject.h" 8 #import "base/scoped_nsobject.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 base::TimeTicks newTabStartTime = base::TimeTicks::Now(); 173 base::TimeTicks newTabStartTime = base::TimeTicks::Now();
174 TabContentsWrapper* contents = 174 TabContentsWrapper* contents =
175 browser_->AddSelectedTabWithURL(GURL(chrome::kChromeUINewTabURL), 175 browser_->AddSelectedTabWithURL(GURL(chrome::kChromeUINewTabURL),
176 PageTransition::TYPED); 176 PageTransition::TYPED);
177 contents->tab_contents()->set_new_tab_start_time(newTabStartTime); 177 contents->tab_contents()->set_new_tab_start_time(newTabStartTime);
178 [aTab setTabContent:contents->tab_contents()]; 178 [aTab setTabContent:contents->tab_contents()];
179 } 179 }
180 180
181 - (void)insertInTabs:(TabAppleScript*)aTab atIndex:(int)index { 181 - (void)insertInTabs:(TabAppleScript*)aTab atIndex:(int)index {
182 // This method gets called when a new tab is created so 182 // This method gets called when a new tab is created so
183 // This method gets called when a new tab is created so
184 // the container and property are set here. 183 // the container and property are set here.
185 [aTab setContainer:self 184 [aTab setContainer:self
186 property:AppleScript::kTabsProperty]; 185 property:AppleScript::kTabsProperty];
187 186
188 // Set how long it takes a tab to be created. 187 // Set how long it takes a tab to be created.
189 base::TimeTicks newTabStartTime = base::TimeTicks::Now(); 188 base::TimeTicks newTabStartTime = base::TimeTicks::Now();
190 browser::NavigateParams params(browser_, 189 browser::NavigateParams params(browser_,
191 GURL(chrome::kChromeUINewTabURL), 190 GURL(chrome::kChromeUINewTabURL),
192 PageTransition::TYPED); 191 PageTransition::TYPED);
193 params.disposition = NEW_FOREGROUND_TAB; 192 params.disposition = NEW_FOREGROUND_TAB;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 [[self nativeHandle] setValue:(id)value forKey:key]; 236 [[self nativeHandle] setValue:(id)value forKey:key];
238 } 237 }
239 238
240 - (void)handlesCloseScriptCommand:(NSCloseCommand*)command { 239 - (void)handlesCloseScriptCommand:(NSCloseCommand*)command {
241 // window() can be NULL during startup. 240 // window() can be NULL during startup.
242 if (browser_->window()) 241 if (browser_->window())
243 browser_->window()->Close(); 242 browser_->window()->Close();
244 } 243 }
245 244
246 @end 245 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/tab_contents/tab_contents_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698