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

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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 #include "chrome/browser/bookmarks/bookmark_utils.h" 5 #include "chrome/browser/bookmarks/bookmark_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 22 matching lines...) Expand all
33 #include "ui/base/dragdrop/drag_drop_types.h" 33 #include "ui/base/dragdrop/drag_drop_types.h"
34 #include "ui/base/l10n/l10n_util.h" 34 #include "ui/base/l10n/l10n_util.h"
35 #include "ui/base/models/tree_node_iterator.h" 35 #include "ui/base/models/tree_node_iterator.h"
36 36
37 #if defined(OS_MACOSX) 37 #if defined(OS_MACOSX)
38 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" 38 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h"
39 #endif 39 #endif
40 40
41 #if defined(TOOLKIT_VIEWS) 41 #if defined(TOOLKIT_VIEWS)
42 #include "ui/base/dragdrop/os_exchange_data.h" 42 #include "ui/base/dragdrop/os_exchange_data.h"
43 #include "ui/base/event.h"
43 #include "ui/views/drag_utils.h" 44 #include "ui/views/drag_utils.h"
44 #include "ui/views/events/event.h"
45 #include "ui/views/widget/native_widget.h" 45 #include "ui/views/widget/native_widget.h"
46 #include "ui/views/widget/widget.h" 46 #include "ui/views/widget/widget.h"
47 #endif 47 #endif
48 48
49 #if defined(TOOLKIT_GTK) 49 #if defined(TOOLKIT_GTK)
50 #include "chrome/browser/ui/gtk/custom_drag.h" 50 #include "chrome/browser/ui/gtk/custom_drag.h"
51 #endif 51 #endif
52 52
53 using base::Time; 53 using base::Time;
54 using content::OpenURLParams; 54 using content::OpenURLParams;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (!profile->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled)) 202 if (!profile->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled))
203 move = 0; 203 move = 0;
204 if (node->is_url()) { 204 if (node->is_url()) {
205 return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK | move; 205 return ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK | move;
206 } 206 }
207 return ui::DragDropTypes::DRAG_COPY | move; 207 return ui::DragDropTypes::DRAG_COPY | move;
208 } 208 }
209 209
210 #if defined(TOOLKIT_VIEWS) 210 #if defined(TOOLKIT_VIEWS)
211 int BookmarkDropOperation(Profile* profile, 211 int BookmarkDropOperation(Profile* profile,
212 const views::DropTargetEvent& event, 212 const ui::DropTargetEvent& event,
213 const BookmarkNodeData& data, 213 const BookmarkNodeData& data,
214 const BookmarkNode* parent, 214 const BookmarkNode* parent,
215 int index) { 215 int index) {
216 if (data.IsFromProfile(profile) && data.size() > 1) 216 if (data.IsFromProfile(profile) && data.size() > 1)
217 // Currently only accept one dragged node at a time. 217 // Currently only accept one dragged node at a time.
218 return ui::DragDropTypes::DRAG_NONE; 218 return ui::DragDropTypes::DRAG_NONE;
219 219
220 if (!bookmark_utils::IsValidDropLocation(profile, data, parent, index)) 220 if (!bookmark_utils::IsValidDropLocation(profile, data, parent, index))
221 return ui::DragDropTypes::DRAG_NONE; 221 return ui::DragDropTypes::DRAG_NONE;
222 222
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 void DisableBookmarkBarViewAnimationsForTesting(bool disabled) { 717 void DisableBookmarkBarViewAnimationsForTesting(bool disabled) {
718 g_bookmark_bar_view_animations_disabled = disabled; 718 g_bookmark_bar_view_animations_disabled = disabled;
719 } 719 }
720 720
721 bool IsBookmarkBarViewAnimationsDisabled() { 721 bool IsBookmarkBarViewAnimationsDisabled() {
722 return g_bookmark_bar_view_animations_disabled; 722 return g_bookmark_bar_view_animations_disabled;
723 } 723 }
724 #endif 724 #endif
725 725
726 } // namespace bookmark_utils 726 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.h ('k') | chrome/browser/chromeos/input_method/candidate_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698