BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / drag_util.h
blob04a0932d334359f5038e0c046c40e9c1c4ee3d47
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_DRAG_UTIL_H_
6 #define CHROME_BROWSER_UI_COCOA_DRAG_UTIL_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/strings/string16.h"
12 class GURL;
13 class Profile;
15 namespace drag_util {
17 // Returns the first file URL from |info|, if there is one. If |info| doesn't
18 // contain any file URLs, an empty |GURL| is returned.
19 GURL GetFileURLFromDropData(id<NSDraggingInfo> info);
21 // Determines whether the given drag and drop operation contains content that
22 // is supported by the web view. In particular, if the content is a local file
23 // URL, this checks if it is of a type that can be shown in the tab contents.
24 BOOL IsUnsupportedDropData(Profile* profile, id<NSDraggingInfo> info);
26 // Returns a drag image for a bookmark.
27 NSImage* DragImageForBookmark(NSImage* favicon,
28 const base::string16& title,
29 CGFloat title_width);
31 } // namespace drag_util
33 #endif // CHROME_BROWSER_UI_COCOA_DRAG_UTIL_H_