| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/drag_util.h" | 5 #import "chrome/browser/ui/cocoa/drag_util.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "content/browser/plugin_service.h" | 11 #include "content/browser/plugin_service.h" |
| 12 #include "content/common/url_constants.h" | 12 #include "content/public/common/url_constants.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "net/base/mime_util.h" | 14 #include "net/base/mime_util.h" |
| 15 #include "net/base/net_util.h" | 15 #include "net/base/net_util.h" |
| 16 #import "third_party/mozilla/NSPasteboard+Utils.h" | 16 #import "third_party/mozilla/NSPasteboard+Utils.h" |
| 17 #include "webkit/plugins/npapi/plugin_list.h" | 17 #include "webkit/plugins/npapi/plugin_list.h" |
| 18 | 18 |
| 19 namespace drag_util { | 19 namespace drag_util { |
| 20 | 20 |
| 21 BOOL PopulateURLAndTitleFromPasteBoard(GURL* url, | 21 BOOL PopulateURLAndTitleFromPasteBoard(GURL* url, |
| 22 string16* title, | 22 string16* title, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 GURL url = GetFileURLFromDropData(info); | 97 GURL url = GetFileURLFromDropData(info); |
| 98 if (!url.is_empty()) { | 98 if (!url.is_empty()) { |
| 99 // If dragging a file, only allow dropping supported file types (that the | 99 // If dragging a file, only allow dropping supported file types (that the |
| 100 // web view can display). | 100 // web view can display). |
| 101 return !IsSupportedFileURL(profile, url); | 101 return !IsSupportedFileURL(profile, url); |
| 102 } | 102 } |
| 103 return NO; | 103 return NO; |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace drag_util | 106 } // namespace drag_util |
| OLD | NEW |