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

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

Issue 2745223005: [ios] Adds a CommandDispatcher to Browser. (Closed)
Patch Set: Move code into ios/shared. Created 3 years, 9 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "ios/clean/chrome/browser/ui/commands/command_dispatcher.h" 5 #import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h"
6 6
7 #include <unordered_map> 7 #include <unordered_map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/sys_string_conversions.h" 11 #include "base/strings/sys_string_conversions.h"
12 12
13 #if !defined(__has_feature) || !__has_feature(objc_arc) 13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support." 14 #error "This file requires ARC support."
15 #endif 15 #endif
(...skipping 30 matching lines...) Expand all
46 // Overridden to forward messages to registered handlers. 46 // Overridden to forward messages to registered handlers.
47 - (id)forwardingTargetForSelector:(SEL)selector { 47 - (id)forwardingTargetForSelector:(SEL)selector {
48 auto target = _forwardingTargets.find(selector); 48 auto target = _forwardingTargets.find(selector);
49 if (target != _forwardingTargets.end()) { 49 if (target != _forwardingTargets.end()) {
50 return target->second; 50 return target->second;
51 } 51 }
52 return [super forwardingTargetForSelector:selector]; 52 return [super forwardingTargetForSelector:selector];
53 } 53 }
54 54
55 @end 55 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698