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

Side by Side Diff: content/browser/tab_contents/drag_utils_gtk.cc

Issue 8196001: content: Split web_drag_dest_gtk.cc into chrome/ and content/ parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix viewgtk compile Created 9 years, 2 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
« no previous file with comments | « content/browser/tab_contents/drag_utils_gtk.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "content/browser/tab_contents/drag_utils_gtk.h"
6
7 using WebKit::WebDragOperationsMask;
8 using WebKit::WebDragOperation;
9 using WebKit::WebDragOperationNone;
10 using WebKit::WebDragOperationCopy;
11 using WebKit::WebDragOperationLink;
12 using WebKit::WebDragOperationMove;
13
14 namespace content {
15
16 GdkDragAction WebDragOpToGdkDragAction(WebDragOperationsMask op) {
17 GdkDragAction action = static_cast<GdkDragAction>(0);
18 if (op & WebDragOperationCopy)
19 action = static_cast<GdkDragAction>(action | GDK_ACTION_COPY);
20 if (op & WebDragOperationLink)
21 action = static_cast<GdkDragAction>(action | GDK_ACTION_LINK);
22 if (op & WebDragOperationMove)
23 action = static_cast<GdkDragAction>(action | GDK_ACTION_MOVE);
24 return action;
25 }
26
27 WebDragOperationsMask GdkDragActionToWebDragOp(GdkDragAction action) {
28 WebDragOperationsMask op = WebDragOperationNone;
29 if (action & GDK_ACTION_COPY)
30 op = static_cast<WebDragOperationsMask>(op | WebDragOperationCopy);
31 if (action & GDK_ACTION_LINK)
32 op = static_cast<WebDragOperationsMask>(op | WebDragOperationLink);
33 if (action & GDK_ACTION_MOVE)
34 op = static_cast<WebDragOperationsMask>(op | WebDragOperationMove);
35 return op;
36 }
37
38 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tab_contents/drag_utils_gtk.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698