Chromium Code Reviews| Index: content/browser/web_contents/web_drag_dest_mac.mm |
| diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm |
| index 7c97892dd4193da1e7f20eb77af542d1b3796f59..707d9a787cb9ffda90ffb64a3c9af068021fc51f 100644 |
| --- a/content/browser/web_contents/web_drag_dest_mac.mm |
| +++ b/content/browser/web_contents/web_drag_dest_mac.mm |
| @@ -142,7 +142,9 @@ int GetModifierFlags() { |
| if (currentRVH_ != webContents_->GetRenderViewHost()) |
| return; |
| - // Nothing to do in the interstitial case. |
| + if ([self onlyAllowsNavigation]) { |
|
sky
2012/07/18 20:58:43
no {}
|
| + return; |
| + } |
| if (delegate_) |
| delegate_->OnDragLeave(); |
| @@ -187,7 +189,6 @@ int GetModifierFlags() { |
| [self draggingEntered:info view:view]; |
| // Check if we only allow navigation and navigate to a url on the pasteboard. |
| - BOOL result = YES; |
| if ([self onlyAllowsNavigation]) { |
| NSPasteboard* pboard = [info draggingPasteboard]; |
| if ([pboard containsURLData]) { |
| @@ -196,14 +197,15 @@ int GetModifierFlags() { |
| webContents_->OpenURL(OpenURLParams( |
| url, Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, |
| false)); |
| + return YES; |
| } else { |
| - result = NO; |
| + return NO; |
| } |
| - } else { |
| - if (delegate_) |
| - delegate_->OnDrop(); |
| } |
| + if (delegate_) |
| + delegate_->OnDrop(); |
| + |
| currentRVH_ = NULL; |
| // Create the appropriate mouse locations for WebCore. The draggingLocation |
| @@ -218,7 +220,7 @@ int GetModifierFlags() { |
| dropData_.reset(); |
| - return result; |
| + return YES; |
| } |
| // Given |data|, which should not be nil, fill it in using the contents of the |