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

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

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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "chrome/browser/bookmarks/bookmark_editor.h" 12 #include "chrome/browser/bookmarks/bookmark_editor.h"
13 #include "chrome/browser/bookmarks/bookmark_node_data.h" 13 #include "chrome/browser/bookmarks/bookmark_node_data.h"
14 #include "chrome/browser/history/snippet.h" 14 #include "chrome/browser/history/snippet.h"
15 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
16 #include "webkit/glue/window_open_disposition.h" 16 #include "webkit/glue/window_open_disposition.h"
17 17
18 class BookmarkModel; 18 class BookmarkModel;
19 class BookmarkNode; 19 class BookmarkNode;
20 class Browser; 20 class Browser;
21 class PrefService; 21 class PrefService;
22 class Profile; 22 class Profile;
23 23
24 namespace content { 24 namespace content {
25 class PageNavigator; 25 class PageNavigator;
26 class WebContents; 26 class WebContents;
27 } 27 }
28 28
29 namespace views { 29 namespace ui {
30 class DropTargetEvent; 30 class DropTargetEvent;
31 } 31 }
32 32
33 // A collection of bookmark utility functions used by various parts of the UI 33 // A collection of bookmark utility functions used by various parts of the UI
34 // that show bookmarks: bookmark manager, bookmark bar view ... 34 // that show bookmarks: bookmark manager, bookmark bar view ...
35 namespace bookmark_utils { 35 namespace bookmark_utils {
36 36
37 // Calculates the drop operation given |source_operations| and the ideal 37 // Calculates the drop operation given |source_operations| and the ideal
38 // set of drop operations (|operations|). This prefers the following ordering: 38 // set of drop operations (|operations|). This prefers the following ordering:
39 // COPY, LINK then MOVE. 39 // COPY, LINK then MOVE.
40 int PreferredDropOperation(int source_operations, int operations); 40 int PreferredDropOperation(int source_operations, int operations);
41 41
42 // Returns the drag operations for the specified node. 42 // Returns the drag operations for the specified node.
43 int BookmarkDragOperation(Profile* profile, const BookmarkNode* node); 43 int BookmarkDragOperation(Profile* profile, const BookmarkNode* node);
44 44
45 // Returns the preferred drop operation on a bookmark menu/bar. 45 // Returns the preferred drop operation on a bookmark menu/bar.
46 // |parent| is the parent node the drop is to occur on and |index| the index the 46 // |parent| is the parent node the drop is to occur on and |index| the index the
47 // drop is over. 47 // drop is over.
48 int BookmarkDropOperation(Profile* profile, 48 int BookmarkDropOperation(Profile* profile,
49 const views::DropTargetEvent& event, 49 const ui::DropTargetEvent& event,
50 const BookmarkNodeData& data, 50 const BookmarkNodeData& data,
51 const BookmarkNode* parent, 51 const BookmarkNode* parent,
52 int index); 52 int index);
53 53
54 // Performs a drop of bookmark data onto |parent_node| at |index|. Returns the 54 // Performs a drop of bookmark data onto |parent_node| at |index|. Returns the
55 // type of drop the resulted. 55 // type of drop the resulted.
56 int PerformBookmarkDrop(Profile* profile, 56 int PerformBookmarkDrop(Profile* profile,
57 const BookmarkNodeData& data, 57 const BookmarkNodeData& data,
58 const BookmarkNode* parent_node, 58 const BookmarkNode* parent_node,
59 int index); 59 int index);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 void RecordBookmarkLaunch(BookmarkLaunchLocation location); 257 void RecordBookmarkLaunch(BookmarkLaunchLocation location);
258 258
259 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(USE_AURA) 259 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(USE_AURA)
260 void DisableBookmarkBarViewAnimationsForTesting(bool disabled); 260 void DisableBookmarkBarViewAnimationsForTesting(bool disabled);
261 bool IsBookmarkBarViewAnimationsDisabled(); 261 bool IsBookmarkBarViewAnimationsDisabled();
262 #endif 262 #endif
263 263
264 } // namespace bookmark_utils 264 } // namespace bookmark_utils
265 265
266 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 266 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_drop_info.cc ('k') | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698