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

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

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace Created 8 years, 5 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 | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('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) 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/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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 - (void)insertInTabs:(TabAppleScript*)aTab atIndex:(int)index { 186 - (void)insertInTabs:(TabAppleScript*)aTab atIndex:(int)index {
187 // This method gets called when a new tab is created so 187 // This method gets called when a new tab is created so
188 // the container and property are set here. 188 // the container and property are set here.
189 [aTab setContainer:self 189 [aTab setContainer:self
190 property:AppleScript::kTabsProperty]; 190 property:AppleScript::kTabsProperty];
191 191
192 // Set how long it takes a tab to be created. 192 // Set how long it takes a tab to be created.
193 base::TimeTicks newTabStartTime = base::TimeTicks::Now(); 193 base::TimeTicks newTabStartTime = base::TimeTicks::Now();
194 browser::NavigateParams params(browser_, 194 chrome::NavigateParams params(browser_, GURL(chrome::kChromeUINewTabURL),
195 GURL(chrome::kChromeUINewTabURL), 195 content::PAGE_TRANSITION_TYPED);
196 content::PAGE_TRANSITION_TYPED);
197 params.disposition = NEW_FOREGROUND_TAB; 196 params.disposition = NEW_FOREGROUND_TAB;
198 params.tabstrip_index = index; 197 params.tabstrip_index = index;
199 browser::Navigate(&params); 198 chrome::Navigate(&params);
200 params.target_contents->web_contents()->SetNewTabStartTime( 199 params.target_contents->web_contents()->SetNewTabStartTime(
201 newTabStartTime); 200 newTabStartTime);
202 201
203 [aTab setTabContent:params.target_contents]; 202 [aTab setTabContent:params.target_contents];
204 } 203 }
205 204
206 - (void)removeFromTabsAtIndex:(int)index { 205 - (void)removeFromTabsAtIndex:(int)index {
207 chrome::CloseWebContents(browser_, chrome::GetWebContentsAt(browser_, index)); 206 chrome::CloseWebContents(browser_, chrome::GetWebContentsAt(browser_, index));
208 } 207 }
209 208
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION); 259 GURL(), FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION);
261 } 260 }
262 } 261 }
263 262
264 - (void)handlesExitPresentationMode:(NSScriptCommand*)command { 263 - (void)handlesExitPresentationMode:(NSScriptCommand*)command {
265 if (browser_->window()) 264 if (browser_->window())
266 browser_->window()->ExitPresentationMode(); 265 browser_->window()->ExitPresentationMode();
267 } 266 }
268 267
269 @end 268 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_pages.cc ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698