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

Side by Side Diff: ui/views/cocoa/native_widget_mac_nswindow.mm

Issue 1894903003: Mac: Fix SDK 10.11 Compile errors after clang roll in r387792 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mock BaseBubbleController Created 4 years, 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_window_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/cocoa/native_widget_mac_nswindow.h" 5 #import "ui/views/cocoa/native_widget_mac_nswindow.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #import "ui/views/cocoa/bridged_native_widget.h" 8 #import "ui/views/cocoa/bridged_native_widget.h"
9 #import "ui/base/cocoa/user_interface_item_command_handler.h" 9 #import "ui/base/cocoa/user_interface_item_command_handler.h"
10 #import "ui/views/cocoa/views_nswindow_delegate.h" 10 #import "ui/views/cocoa/views_nswindow_delegate.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 // NSWindow overrides (NSUserInterfaceItemValidations implementation) 194 // NSWindow overrides (NSUserInterfaceItemValidations implementation)
195 195
196 - (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item { 196 - (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)item {
197 // Since this class implements these selectors, |super| will always say they 197 // Since this class implements these selectors, |super| will always say they
198 // are enabled. Only use [super] to validate other selectors. If there is no 198 // are enabled. Only use [super] to validate other selectors. If there is no
199 // command handler, defer to AppController. 199 // command handler, defer to AppController.
200 if ([item action] == @selector(commandDispatch:) || 200 if ([item action] == @selector(commandDispatch:) ||
201 [item action] == @selector(commandDispatchUsingKeyModifiers:)) { 201 [item action] == @selector(commandDispatchUsingKeyModifiers:)) {
202 return commandHandler_ 202 if (commandHandler_)
203 ? [commandHandler_ validateUserInterfaceItem:item window:self] 203 return [commandHandler_ validateUserInterfaceItem:item window:self];
204 : [[NSApp delegate] validateUserInterfaceItem:item]; 204
205 id appController = [NSApp delegate];
206 DCHECK([appController
207 conformsToProtocol:@protocol(NSUserInterfaceValidations)]);
208 return [appController validateUserInterfaceItem:item];
205 } 209 }
206 210
207 return [super validateUserInterfaceItem:item]; 211 return [super validateUserInterfaceItem:item];
208 } 212 }
209 213
210 @end 214 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_window_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698