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

Unified Diff: chrome/browser/gtk/dnd_registry.cc

Issue 151033: More web contents dragging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more Dones Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/dnd_registry.h ('k') | chrome/browser/gtk/gtk_dnd_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/dnd_registry.cc
===================================================================
--- chrome/browser/gtk/dnd_registry.cc (revision 19526)
+++ chrome/browser/gtk/dnd_registry.cc (working copy)
@@ -1,47 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "dnd_registry.h"
-
-namespace dnd {
-
-GtkTargetList* GetTargetListFromCodeMask(int code_mask) {
- GtkTargetList* targets = gtk_target_list_new(NULL, 0);
-
- if (code_mask & X_CHROME_TAB) {
- GdkAtom tab_atom = gdk_atom_intern(
- const_cast<char*>("application/x-chrome-tab"), false);
- gtk_target_list_add(targets, tab_atom, GTK_TARGET_SAME_APP,
- X_CHROME_TAB);
- }
-
- if (code_mask & X_CHROME_TEXT_PLAIN)
- gtk_target_list_add_text_targets(targets, X_CHROME_TEXT_PLAIN);
-
- if (code_mask & X_CHROME_TEXT_URI_LIST)
- gtk_target_list_add_uri_targets(targets, X_CHROME_TEXT_URI_LIST);
-
- if (code_mask & X_CHROME_BOOKMARK_ITEM) {
- GdkAtom bookmark_atom = gdk_atom_intern(
- const_cast<char*>("application/x-chrome-bookmark-item"), false);
- gtk_target_list_add(targets, bookmark_atom, GTK_TARGET_SAME_APP,
- X_CHROME_BOOKMARK_ITEM);
- }
-
- return targets;
-}
-
-void SetDestTargetListFromCodeMask(GtkWidget* dest, int code_mask) {
- GtkTargetList* targets = GetTargetListFromCodeMask(code_mask);
- gtk_drag_dest_set_target_list(dest, targets);
- gtk_target_list_unref(targets);
-}
-
-void SetSourceTargetListFromCodeMask(GtkWidget* source, int code_mask) {
- GtkTargetList* targets = GetTargetListFromCodeMask(code_mask);
- gtk_drag_source_set_target_list(source, targets);
- gtk_target_list_unref(targets);
-}
-
-} // namespace dnd
« no previous file with comments | « chrome/browser/gtk/dnd_registry.h ('k') | chrome/browser/gtk/gtk_dnd_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698