OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/strings/sys_string_conversions.h" | 15 #include "base/strings/sys_string_conversions.h" |
16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h" | 18 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h" |
19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 19 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
20 #include "components/bookmarks/browser/bookmark_model.h" | 20 #include "components/bookmarks/browser/bookmark_model.h" |
21 #include "components/bookmarks/browser/bookmark_node_data.h" | 21 #include "components/bookmarks/browser/bookmark_node_data.h" |
22 #include "grit/ui_resources.h" | |
23 #include "ui/base/dragdrop/drag_drop_types.h" | 22 #include "ui/base/dragdrop/drag_drop_types.h" |
24 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 24 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 25 #include "ui/resources/grit/ui_resources.h" |
26 | 26 |
27 using bookmarks::BookmarkNodeData; | 27 using bookmarks::BookmarkNodeData; |
28 | 28 |
29 namespace chrome { | 29 namespace chrome { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // Make a drag image from the drop data. | 33 // Make a drag image from the drop data. |
34 NSImage* MakeDragImage(BookmarkModel* model, | 34 NSImage* MakeDragImage(BookmarkModel* model, |
35 const std::vector<const BookmarkNode*>& nodes) { | 35 const std::vector<const BookmarkNode*>& nodes) { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 offset:NSZeroSize | 170 offset:NSZeroSize |
171 event:drag_event | 171 event:drag_event |
172 pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] | 172 pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] |
173 source:nil | 173 source:nil |
174 slideBack:YES]; | 174 slideBack:YES]; |
175 | 175 |
176 base::MessageLoop::current()->SetNestableTasksAllowed(was_nested); | 176 base::MessageLoop::current()->SetNestableTasksAllowed(was_nested); |
177 } | 177 } |
178 | 178 |
179 } // namespace chrome | 179 } // namespace chrome |
OLD | NEW |