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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 1305143008: [Mac] Implement LocationBarViewMac::UpdateLocationBarVisibility() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer feedback Created 5 years, 2 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 (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/toolbar/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "ui/base/l10n/l10n_util_mac.h" 63 #include "ui/base/l10n/l10n_util_mac.h"
64 #include "ui/gfx/geometry/rect.h" 64 #include "ui/gfx/geometry/rect.h"
65 #include "ui/gfx/image/image.h" 65 #include "ui/gfx/image/image.h"
66 66
67 using content::OpenURLParams; 67 using content::OpenURLParams;
68 using content::Referrer; 68 using content::Referrer;
69 using content::WebContents; 69 using content::WebContents;
70 70
71 namespace { 71 namespace {
72 72
73 // Duration of the toolbar animation.
74 const NSTimeInterval kToolBarAnimationDuration = 0.12;
tapted 2015/10/20 06:31:09 Can this be shared with something? (just asking..
dominickn 2015/10/26 02:53:04 I set this value to be the same as the bookmark ba
tapted 2015/10/26 04:40:55 So probably it should move to animatable_view.mm a
dominickn 2015/10/26 06:42:42 Acknowledged.
75
73 // Height of the toolbar in pixels when the bookmark bar is closed. 76 // Height of the toolbar in pixels when the bookmark bar is closed.
74 const CGFloat kBaseToolbarHeightNormal = 35.0; 77 const CGFloat kBaseToolbarHeightNormal = 35.0;
75 78
76 // The padding above the toolbar elements. This is calculated from the values 79 // The padding above the toolbar elements. This is calculated from the values
77 // in Toolbar.xib: the height of the toolbar (35) minus the height of the child 80 // in Toolbar.xib: the height of the toolbar (35) minus the height of the child
78 // elements (29) minus the y-origin of the elements (4). 81 // elements (29) minus the y-origin of the elements (4).
79 const CGFloat kToolbarElementTopPadding = 2.0; 82 const CGFloat kToolbarElementTopPadding = 2.0;
80 83
81 // The minimum width of the location bar in pixels. 84 // The minimum width of the location bar in pixels.
82 const CGFloat kMinimumLocationBarWidth = 100.0; 85 const CGFloat kMinimumLocationBarWidth = 100.0;
83 86
87 // The padding to the left and right of the location bar when it is shown
88 // by itself in the toolbar.
89 const CGFloat kLocationBarOnlyHorizontalPadding = 3.0;
90
84 // The amount of left padding that the wrench menu should have. 91 // The amount of left padding that the wrench menu should have.
85 const CGFloat kWrenchMenuLeftPadding = 3.0; 92 const CGFloat kWrenchMenuLeftPadding = 3.0;
86 93
87 class BrowserActionsContainerDelegate : 94 class BrowserActionsContainerDelegate :
88 public BrowserActionsContainerViewSizeDelegate { 95 public BrowserActionsContainerViewSizeDelegate {
89 public: 96 public:
90 BrowserActionsContainerDelegate( 97 BrowserActionsContainerDelegate(
91 AutocompleteTextField* location_bar, 98 AutocompleteTextField* location_bar,
92 BrowserActionsContainerView* browser_actions_container_view); 99 BrowserActionsContainerView* browser_actions_container_view);
93 ~BrowserActionsContainerDelegate() override; 100 ~BrowserActionsContainerDelegate() override;
(...skipping 27 matching lines...) Expand all
121 } 128 }
122 129
123 } // namespace 130 } // namespace
124 131
125 @interface ToolbarController() 132 @interface ToolbarController()
126 @property(assign, nonatomic) Browser* browser; 133 @property(assign, nonatomic) Browser* browser;
127 - (void)cleanUp; 134 - (void)cleanUp;
128 - (void)addAccessibilityDescriptions; 135 - (void)addAccessibilityDescriptions;
129 - (void)initCommandStatus:(CommandUpdater*)commands; 136 - (void)initCommandStatus:(CommandUpdater*)commands;
130 - (void)prefChanged:(const std::string&)prefName; 137 - (void)prefChanged:(const std::string&)prefName;
131 - (BackgroundGradientView*)backgroundGradientView; 138 - (ToolbarView*)toolbarView;
132 - (void)toolbarFrameChanged; 139 - (void)toolbarFrameChanged;
133 - (void)pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:(BOOL)animate; 140 - (void)pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:(BOOL)animate;
134 - (void)maintainMinimumLocationBarWidth; 141 - (void)maintainMinimumLocationBarWidth;
135 - (void)adjustBrowserActionsContainerForNewWindow:(NSNotification*)notification; 142 - (void)adjustBrowserActionsContainerForNewWindow:(NSNotification*)notification;
136 - (void)browserActionsContainerDragged:(NSNotification*)notification; 143 - (void)browserActionsContainerDragged:(NSNotification*)notification;
137 - (void)browserActionsVisibilityChanged:(NSNotification*)notification; 144 - (void)browserActionsVisibilityChanged:(NSNotification*)notification;
138 - (void)browserActionsContainerWillAnimate:(NSNotification*)notification; 145 - (void)browserActionsContainerWillAnimate:(NSNotification*)notification;
139 - (void)adjustLocationSizeBy:(CGFloat)dX animate:(BOOL)animate; 146 - (void)adjustLocationSizeBy:(CGFloat)dX animate:(BOOL)animate;
140 - (void)updateWrenchButtonSeverity:(WrenchIconPainter::Severity)severity 147 - (void)updateWrenchButtonSeverity:(WrenchIconPainter::Severity)severity
141 animate:(BOOL)animate; 148 animate:(BOOL)animate;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 209
203 } // namespace ToolbarControllerInternal 210 } // namespace ToolbarControllerInternal
204 211
205 @implementation ToolbarController 212 @implementation ToolbarController
206 213
207 @synthesize browser = browser_; 214 @synthesize browser = browser_;
208 215
209 - (id)initWithCommands:(CommandUpdater*)commands 216 - (id)initWithCommands:(CommandUpdater*)commands
210 profile:(Profile*)profile 217 profile:(Profile*)profile
211 browser:(Browser*)browser 218 browser:(Browser*)browser
219 resizeDelegate:(id<ViewResizer>)resizeDelegate
212 nibFileNamed:(NSString*)nibName { 220 nibFileNamed:(NSString*)nibName {
213 DCHECK(commands && profile && [nibName length]); 221 DCHECK(commands && profile && [nibName length]);
214 if ((self = [super initWithNibName:nibName 222 if ((self = [super initWithNibName:nibName
215 bundle:base::mac::FrameworkBundle()])) { 223 bundle:base::mac::FrameworkBundle()])) {
216 commands_ = commands; 224 commands_ = commands;
217 profile_ = profile; 225 profile_ = profile;
218 browser_ = browser; 226 browser_ = browser;
219 hasToolbar_ = YES; 227 hasToolbar_ = YES;
220 hasLocationBar_ = YES; 228 hasLocationBar_ = YES;
221 229
222 // Register for notifications about state changes for the toolbar buttons 230 // Register for notifications about state changes for the toolbar buttons
223 commandObserver_.reset( 231 commandObserver_.reset(
224 new ToolbarControllerInternal::CommandObserverBridge(self)); 232 new ToolbarControllerInternal::CommandObserverBridge(self));
225 233
226 commands->AddCommandObserver(IDC_BACK, commandObserver_.get()); 234 commands->AddCommandObserver(IDC_BACK, commandObserver_.get());
227 commands->AddCommandObserver(IDC_FORWARD, commandObserver_.get()); 235 commands->AddCommandObserver(IDC_FORWARD, commandObserver_.get());
228 commands->AddCommandObserver(IDC_RELOAD, commandObserver_.get()); 236 commands->AddCommandObserver(IDC_RELOAD, commandObserver_.get());
229 commands->AddCommandObserver(IDC_HOME, commandObserver_.get()); 237 commands->AddCommandObserver(IDC_HOME, commandObserver_.get());
230 commands->AddCommandObserver(IDC_BOOKMARK_PAGE, commandObserver_.get()); 238 commands->AddCommandObserver(IDC_BOOKMARK_PAGE, commandObserver_.get());
231 // NOTE: Don't remove the command observers. ToolbarController is 239 // NOTE: Don't remove the command observers. ToolbarController is
232 // autoreleased at about the same time as the CommandUpdater (owned by the 240 // autoreleased at about the same time as the CommandUpdater (owned by the
233 // Browser), so |commands_| may not be valid any more. 241 // Browser), so |commands_| may not be valid any more.
242
243 [[self toolbarView] setResizeDelegate:resizeDelegate];
234 } 244 }
235 return self; 245 return self;
236 } 246 }
237 247
238 - (id)initWithCommands:(CommandUpdater*)commands 248 - (id)initWithCommands:(CommandUpdater*)commands
239 profile:(Profile*)profile 249 profile:(Profile*)profile
240 browser:(Browser*)browser { 250 browser:(Browser*)browser
251 resizeDelegate:(id<ViewResizer>)resizeDelegate {
241 if ((self = [self initWithCommands:commands 252 if ((self = [self initWithCommands:commands
242 profile:profile 253 profile:profile
243 browser:browser 254 browser:browser
255 resizeDelegate:resizeDelegate
244 nibFileNamed:@"Toolbar"])) { 256 nibFileNamed:@"Toolbar"])) {
245 // Start global error services now so we badge the menu correctly. 257 // Start global error services now so we badge the menu correctly.
246 SyncGlobalErrorFactory::GetForProfile(profile); 258 SyncGlobalErrorFactory::GetForProfile(profile);
247 } 259 }
248 return self; 260 return self;
249 } 261 }
250 262
251 // Called after the view is done loading and the outlets have been hooked up. 263 // Called after the view is done loading and the outlets have been hooked up.
252 // Now we can hook up bridges that rely on UI objects such as the location bar 264 // Now we can hook up bridges that rely on UI objects such as the location bar
253 // and button state. -viewDidLoad is the recommended way to do this in 10.10 265 // and button state. -viewDidLoad is the recommended way to do this in 10.10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // Create the controllers for the back/forward menus. 354 // Create the controllers for the back/forward menus.
343 backMenuController_.reset([[BackForwardMenuController alloc] 355 backMenuController_.reset([[BackForwardMenuController alloc]
344 initWithBrowser:browser_ 356 initWithBrowser:browser_
345 modelType:BACK_FORWARD_MENU_TYPE_BACK 357 modelType:BACK_FORWARD_MENU_TYPE_BACK
346 button:backButton_]); 358 button:backButton_]);
347 forwardMenuController_.reset([[BackForwardMenuController alloc] 359 forwardMenuController_.reset([[BackForwardMenuController alloc]
348 initWithBrowser:browser_ 360 initWithBrowser:browser_
349 modelType:BACK_FORWARD_MENU_TYPE_FORWARD 361 modelType:BACK_FORWARD_MENU_TYPE_FORWARD
350 button:forwardButton_]); 362 button:forwardButton_]);
351 363
352 // For a popup window, the toolbar is really just a location bar
353 // (see override for [ToolbarController view], below). When going
354 // fullscreen, we remove the toolbar controller's view from the view
355 // hierarchy. Calling [locationBar_ removeFromSuperview] when going
356 // fullscreen causes it to get released, making us unhappy
357 // (http://crbug.com/18551). We avoid the problem by incrementing
358 // the retain count of the location bar; use of the scoped object
359 // helps us remember to release it.
360 locationBarRetainer_.reset([locationBar_ retain]);
361 trackingArea_.reset( 364 trackingArea_.reset(
362 [[CrTrackingArea alloc] initWithRect:NSZeroRect // Ignored 365 [[CrTrackingArea alloc] initWithRect:NSZeroRect // Ignored
363 options:NSTrackingMouseMoved | 366 options:NSTrackingMouseMoved |
364 NSTrackingInVisibleRect | 367 NSTrackingInVisibleRect |
365 NSTrackingMouseEnteredAndExited | 368 NSTrackingMouseEnteredAndExited |
366 NSTrackingActiveAlways 369 NSTrackingActiveAlways
367 owner:self 370 owner:self
368 userInfo:nil]); 371 userInfo:nil]);
369 NSView* toolbarView = [self view]; 372 NSView* toolbarView = [self view];
370 [toolbarView addTrackingArea:trackingArea_.get()]; 373 [toolbarView addTrackingArea:trackingArea_.get()];
(...skipping 17 matching lines...) Expand all
388 391
389 [self addAccessibilityDescriptions]; 392 [self addAccessibilityDescriptions];
390 } 393 }
391 394
392 - (void)dealloc { 395 - (void)dealloc {
393 [self cleanUp]; 396 [self cleanUp];
394 [super dealloc]; 397 [super dealloc];
395 } 398 }
396 399
397 - (void)browserWillBeDestroyed { 400 - (void)browserWillBeDestroyed {
401 // Clear resize delegate so it doesn't get called during stopAnimation, and
402 // stop any in-flight animation.
403 [[self toolbarView] setResizeDelegate:nil];
404 [[self toolbarView] stopAnimation];
405
398 // Pass this call onto other reference counted objects. 406 // Pass this call onto other reference counted objects.
399 [backMenuController_ browserWillBeDestroyed]; 407 [backMenuController_ browserWillBeDestroyed];
400 [forwardMenuController_ browserWillBeDestroyed]; 408 [forwardMenuController_ browserWillBeDestroyed];
401 [browserActionsController_ browserWillBeDestroyed]; 409 [browserActionsController_ browserWillBeDestroyed];
402 [wrenchMenuController_ browserWillBeDestroyed]; 410 [wrenchMenuController_ browserWillBeDestroyed];
403 411
404 [self cleanUp]; 412 [self cleanUp];
405 } 413 }
406 414
407 - (void)cleanUp { 415 - (void)cleanUp {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 588
581 hasToolbar_ = toolbar; 589 hasToolbar_ = toolbar;
582 590
583 // If there's a toolbar, there must be a location bar. 591 // If there's a toolbar, there must be a location bar.
584 DCHECK((toolbar && locBar) || !toolbar); 592 DCHECK((toolbar && locBar) || !toolbar);
585 hasLocationBar_ = toolbar ? YES : locBar; 593 hasLocationBar_ = toolbar ? YES : locBar;
586 594
587 // Decide whether to hide/show based on whether there's a location bar. 595 // Decide whether to hide/show based on whether there's a location bar.
588 [[self view] setHidden:!hasLocationBar_]; 596 [[self view] setHidden:!hasLocationBar_];
589 597
590 // Make location bar not editable when in a pop-up. 598 // Make location bar not editable when in a pop-up or an app window.
591 locationBarView_->SetEditable(toolbar); 599 locationBarView_->SetEditable(toolbar);
600
601 // Hide the toolbar buttons and only display the location bar in the view
602 // if we do not have a toolbar but have a location bar.
603 if (!toolbar && locBar)
604 [self showLocationBarOnly];
592 } 605 }
593 606
594 - (NSView*)view { 607 // (Private) Returns the backdrop to the toolbar as a ToolbarView.
595 if (hasToolbar_) 608 - (ToolbarView*)toolbarView{
596 return [super view]; 609 return base::mac::ObjCCastStrict<ToolbarView>([self view]);
597 return locationBar_;
598 }
599
600 // (Private) Returns the backdrop to the toolbar.
601 - (BackgroundGradientView*)backgroundGradientView {
602 // We really do mean |[super view]|; see our override of |-view|.
603 DCHECK([[super view] isKindOfClass:[BackgroundGradientView class]]);
604 return (BackgroundGradientView*)[super view];
605 } 610 }
606 611
607 - (id)customFieldEditorForObject:(id)obj { 612 - (id)customFieldEditorForObject:(id)obj {
608 if (obj == locationBar_) { 613 if (obj == locationBar_) {
609 // Lazilly construct Field editor, Cocoa UI code always runs on the 614 // Lazilly construct Field editor, Cocoa UI code always runs on the
610 // same thread, so there shoudn't be a race condition here. 615 // same thread, so there shoudn't be a race condition here.
611 if (autocompleteTextFieldEditor_.get() == nil) { 616 if (autocompleteTextFieldEditor_.get() == nil) {
612 autocompleteTextFieldEditor_.reset( 617 autocompleteTextFieldEditor_.reset(
613 [[AutocompleteTextFieldEditor alloc] init]); 618 [[AutocompleteTextFieldEditor alloc] init]);
614 } 619 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 [[NSNotificationCenter defaultCenter] 724 [[NSNotificationCenter defaultCenter]
720 addObserver:self 725 addObserver:self
721 selector:@selector(adjustBrowserActionsContainerForNewWindow:) 726 selector:@selector(adjustBrowserActionsContainerForNewWindow:)
722 name:NSWindowDidBecomeKeyNotification 727 name:NSWindowDidBecomeKeyNotification
723 object:[[self view] window]]; 728 object:[[self view] window]];
724 } 729 }
725 if (![browserActionsContainerView_ isHidden]) 730 if (![browserActionsContainerView_ isHidden])
726 [self pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:NO]; 731 [self pinLocationBarToLeftOfBrowserActionsContainerAndAnimate:NO];
727 } 732 }
728 733
734 - (void)updateVisibility:(BOOL)visible withAnimation:(BOOL)animate {
735 // |visible| being YES is equivalent to [[toolbarController_ view] isHidden]
736 // being NO, and vice-versa. That is, when |visible| and |isHidden| have the
737 // same value, a state change is needed.
738 ToolbarView* view = [self toolbarView];
739 if ([view isHidden] == visible) {
740 // Send showLocationBarOnly if there is no toolbar and there is a location
741 // bar. This displays the toolbar with only the location bar inside it.
742 [self setHasToolbar:hasToolbar_ hasLocationBar:visible];
tapted 2015/10/20 06:31:09 This is in the wrong place. But.. I'm wondering if
dominickn 2015/10/26 02:53:04 HostedAppBrowserController::UpdateLocationBarVisib
tapted 2015/10/26 04:40:55 The point is that, currently, browser_window_contr
dominickn 2015/10/26 06:42:42 Removing the call breaks the animation for bookmar
743
744 // updateVisibility is only called when in a hosted app. The bookmark bar is
745 // never visible in these apps, so the desired height will always be
746 // kBaseToolbarHeightNormal.
747 CGFloat newHeight = visible ? kBaseToolbarHeightNormal : 0;
748
749 // Perform the animation, which will cause the BrowserWindowController to
750 // resize this view in the browser layout as required.
751 if (animate) {
752 [view animateToNewHeight:newHeight
753 duration:kToolBarAnimationDuration];
754 } else {
755 [view setHeight:newHeight];
756 }
757 }
758 }
759
760 - (void)showLocationBarOnly {
761 // Ignore this message if the toolbar is shown or the location bar is hidden.
762 if (hasToolbar_ || !hasLocationBar_)
tapted 2015/10/20 06:31:09 Can this be a DCHECK now? (with the reverse logic)
dominickn 2015/10/26 02:53:04 Now that the callsite for this method has changed,
763 return;
764
765 // If the toolbar buttons are already hidden, return. Assumes that the back,
766 // forward, reload, and wrench buttons are either shown or hidden together.
767 if ([backButton_ isHidden]) {
768 DCHECK_EQ(YES, [backButton_ isHidden] && [forwardButton_ isHidden] &&
769 [reloadButton_ isHidden] && [wrenchButton_ isHidden]);
770 return;
771 }
772
773 // Adjust the location bar frame to stretch the full width of the toolbar,
774 // with padding on either side.
775 NSRect locationFrame = [locationBar_ frame];
776 locationFrame.origin.x = kLocationBarOnlyHorizontalPadding;
777 locationFrame.size.width =
778 NSWidth([[self view] frame]) - 2 * kLocationBarOnlyHorizontalPadding;
779 [locationBar_ setFrame:locationFrame];
780
781 [backButton_ setHidden:YES];
782 [forwardButton_ setHidden:YES];
783 [reloadButton_ setHidden:YES];
784 [wrenchButton_ setHidden:YES];
785
786 if (!showHomeButton_.GetValue())
tapted 2015/10/20 06:31:09 This check isn't needed
dominickn 2015/10/26 02:53:04 Done.
787 [homeButton_ setHidden:YES];
788 }
789
729 - (void)adjustBrowserActionsContainerForNewWindow: 790 - (void)adjustBrowserActionsContainerForNewWindow:
730 (NSNotification*)notification { 791 (NSNotification*)notification {
731 [self toolbarFrameChanged]; 792 [self toolbarFrameChanged];
732 [[NSNotificationCenter defaultCenter] 793 [[NSNotificationCenter defaultCenter]
733 removeObserver:self 794 removeObserver:self
734 name:NSWindowDidBecomeKeyNotification 795 name:NSWindowDidBecomeKeyNotification
735 object:[[self view] window]]; 796 object:[[self view] window]];
736 } 797 }
737 798
738 - (void)browserActionsContainerDragged:(NSNotification*)notification { 799 - (void)browserActionsContainerDragged:(NSNotification*)notification {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 925
865 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight { 926 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight {
866 // With no toolbar, just ignore the compression. 927 // With no toolbar, just ignore the compression.
867 if (!hasToolbar_) 928 if (!hasToolbar_)
868 return NSHeight([locationBar_ frame]); 929 return NSHeight([locationBar_ frame]);
869 930
870 return kBaseToolbarHeightNormal - compressByHeight; 931 return kBaseToolbarHeightNormal - compressByHeight;
871 } 932 }
872 933
873 - (void)setDividerOpacity:(CGFloat)opacity { 934 - (void)setDividerOpacity:(CGFloat)opacity {
874 BackgroundGradientView* view = [self backgroundGradientView]; 935 ToolbarView* view = [self toolbarView];
tapted 2015/10/20 06:31:09 view -> toolbarView
dominickn 2015/10/26 02:53:04 Done.
875 [view setShowsDivider:(opacity > 0 ? YES : NO)]; 936 [view setShowsDivider:(opacity > 0 ? YES : NO)];
876 937
877 // We may not have a toolbar view (e.g., popup windows only have a location 938 ToolbarView* toolbarView = (ToolbarView*)view;
878 // bar). 939 [toolbarView setDividerOpacity:opacity];
879 if ([view isKindOfClass:[ToolbarView class]]) {
880 ToolbarView* toolbarView = (ToolbarView*)view;
881 [toolbarView setDividerOpacity:opacity];
882 }
883 940
884 [view setNeedsDisplay:YES]; 941 [view setNeedsDisplay:YES];
885 } 942 }
886 943
887 - (BrowserActionsController*)browserActionsController { 944 - (BrowserActionsController*)browserActionsController {
888 return browserActionsController_.get(); 945 return browserActionsController_.get();
889 } 946 }
890 947
891 - (NSView*)wrenchButton { 948 - (NSView*)wrenchButton {
892 return wrenchButton_; 949 return wrenchButton_;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 - (void)hideDropURLsIndicatorInView:(NSView*)view { 1007 - (void)hideDropURLsIndicatorInView:(NSView*)view {
951 // Do nothing. 1008 // Do nothing.
952 } 1009 }
953 1010
954 // (URLDropTargetController protocol) 1011 // (URLDropTargetController protocol)
955 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 1012 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
956 return drag_util::IsUnsupportedDropData(profile_, info); 1013 return drag_util::IsUnsupportedDropData(profile_, info);
957 } 1014 }
958 1015
959 @end 1016 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698