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

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

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: merge master Created 4 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
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/tab_applescript.h" 5 #import "chrome/browser/ui/cocoa/applescript/tab_applescript.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 AppleScript::AppleScriptCommand::TAB_GO_FORWARD); 214 AppleScript::AppleScriptCommand::TAB_GO_FORWARD);
215 NavigationController& navigationController = webContents_->GetController(); 215 NavigationController& navigationController = webContents_->GetController();
216 if (navigationController.CanGoForward()) 216 if (navigationController.CanGoForward())
217 navigationController.GoForward(); 217 navigationController.GoForward();
218 } 218 }
219 219
220 - (void)handlesReloadScriptCommand:(NSScriptCommand*)command { 220 - (void)handlesReloadScriptCommand:(NSScriptCommand*)command {
221 AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_RELOAD); 221 AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_RELOAD);
222 NavigationController& navigationController = webContents_->GetController(); 222 NavigationController& navigationController = webContents_->GetController();
223 const bool checkForRepost = true; 223 const bool checkForRepost = true;
224 navigationController.Reload(checkForRepost); 224 navigationController.Reload(content::ReloadType::NORMAL, checkForRepost);
225 } 225 }
226 226
227 - (void)handlesStopScriptCommand:(NSScriptCommand*)command { 227 - (void)handlesStopScriptCommand:(NSScriptCommand*)command {
228 AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_STOP); 228 AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_STOP);
229 webContents_->Stop(); 229 webContents_->Stop();
230 } 230 }
231 231
232 - (void)handlesPrintScriptCommand:(NSScriptCommand*)command { 232 - (void)handlesPrintScriptCommand:(NSScriptCommand*)command {
233 AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_PRINT); 233 AppleScript::LogAppleScriptUMA(AppleScript::AppleScriptCommand::TAB_PRINT);
234 bool initiated = printing::PrintViewManager::FromWebContents(webContents_) 234 bool initiated = printing::PrintViewManager::FromWebContents(webContents_)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 base::string16 script = base::SysNSStringToUTF16( 316 base::string16 script = base::SysNSStringToUTF16(
317 [[command evaluatedArguments] objectForKey:@"javascript"]); 317 [[command evaluatedArguments] objectForKey:@"javascript"]);
318 frame->ExecuteJavaScriptInIsolatedWorld( 318 frame->ExecuteJavaScriptInIsolatedWorld(
319 script, callback, chrome::ISOLATED_WORLD_ID_APPLESCRIPT); 319 script, callback, chrome::ISOLATED_WORLD_ID_APPLESCRIPT);
320 320
321 return nil; 321 return nil;
322 } 322 }
323 323
324 @end 324 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/collected_cookies_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698