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

Side by Side Diff: ios/chrome/browser/ui/commands/generic_chrome_command.mm

Issue 942793002: [iOS] Upstream chrome commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
6
7 #import <UIKit/UIKit.h>
8
9 #include "base/logging.h"
10 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
11
12 @implementation GenericChromeCommand {
13 NSInteger _tag;
14 }
15
16 @synthesize tag = _tag;
17
18 - (instancetype)init {
19 return [self initWithTag:0];
20 }
21
22 - (instancetype)initWithTag:(NSInteger)tag {
23 self = [super init];
24 if (self) {
25 _tag = tag;
26 }
27 return self;
28 }
29
30 - (void)executeOnMainWindow {
31 UIWindow* mainWindow = [[UIApplication sharedApplication] keyWindow];
32 DCHECK(mainWindow);
33 [mainWindow chromeExecuteCommand:self];
34 }
35
36 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/commands/generic_chrome_command.h ('k') | ios/chrome/browser/ui/commands/open_url_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698