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

Unified Diff: ios/chrome/browser/ui/commands/open_url_command.mm

Issue 1124173004: [iOS] Upstream //ios/chrome/browser/ui/commands changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/commands/open_url_command.mm
diff --git a/ios/chrome/browser/ui/commands/open_url_command.mm b/ios/chrome/browser/ui/commands/open_url_command.mm
index a52a40484d6bb171a2c408e455b3b93d41fadc65..5322cd5d3bc54b51374d9ce1380a18b186a6c597 100644
--- a/ios/chrome/browser/ui/commands/open_url_command.mm
+++ b/ios/chrome/browser/ui/commands/open_url_command.mm
@@ -4,7 +4,9 @@
#import "ios/chrome/browser/ui/commands/open_url_command.h"
+#include "base/logging.h"
#include "base/mac/scoped_nsobject.h"
+#include "ios/chrome/browser/ui/commands/ios_command_ids.h"
#include "ios/web/public/referrer.h"
#include "url/gurl.h"
@@ -12,24 +14,28 @@
GURL _url;
web::Referrer _referrer;
base::scoped_nsobject<NSString> _windowName;
- BOOL _inIncognito;
- BOOL _inBackground;
- BOOL _fromChrome;
- OpenPosition _appendTo;
}
+@synthesize inIncognito = _inIncognito;
+@synthesize inBackground = _inBackground;
@synthesize fromChrome = _fromChrome;
+@synthesize appendTo = _appendTo;
-- (id)initWithURL:(const GURL&)url
- referrer:(const web::Referrer&)referrer
- windowName:(NSString*)windowName
- inIncognito:(BOOL)inIncognito
- inBackground:(BOOL)inBackground
- appendTo:(OpenPosition)appendTo {
- if ((self = [super init])) {
+- (instancetype)initWithTag:(NSInteger)tag {
+ NOTREACHED();
+ return nil;
+}
+
+- (instancetype)initWithURL:(const GURL&)url
+ referrer:(const web::Referrer&)referrer
+ windowName:(NSString*)windowName
+ inIncognito:(BOOL)inIncognito
+ inBackground:(BOOL)inBackground
+ appendTo:(OpenPosition)appendTo {
+ if ((self = [super initWithTag:IDC_OPEN_URL])) {
_url = url;
_referrer = referrer;
- _windowName.reset([windowName retain]);
+ _windowName.reset([windowName copy]);
_inIncognito = inIncognito;
_inBackground = inBackground;
_appendTo = appendTo;
@@ -37,7 +43,7 @@
return self;
}
-- (id)initWithURLFromChrome:(const GURL&)url {
+- (instancetype)initWithURLFromChrome:(const GURL&)url {
if ((self = [self initWithURL:url
referrer:web::Referrer()
windowName:nil
@@ -61,16 +67,4 @@
return _windowName.get();
}
-- (BOOL)inIncognito {
- return _inIncognito;
-}
-
-- (BOOL)inBackground {
- return _inBackground;
-}
-
-- (OpenPosition)appendTo {
- return _appendTo;
-}
-
@end
« no previous file with comments | « ios/chrome/browser/ui/commands/open_url_command.h ('k') | ios/chrome/browser/ui/commands/set_up_for_testing_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698