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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc

Issue 8609009: Linux/Gtk: Drag source should not delete source data on drop in tab strip. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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/gtk/tabs/tab_strip_gtk.h" 5 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 hover_tab_selector_.CancelTabTransition(); 2127 hover_tab_selector_.CancelTabTransition();
2128 2128
2129 return FALSE; 2129 return FALSE;
2130 } 2130 }
2131 2131
2132 gboolean TabStripGtk::OnDragDataReceived(GtkWidget* widget, 2132 gboolean TabStripGtk::OnDragDataReceived(GtkWidget* widget,
2133 GdkDragContext* context, 2133 GdkDragContext* context,
2134 gint x, gint y, 2134 gint x, gint y,
2135 GtkSelectionData* data, 2135 GtkSelectionData* data,
2136 guint info, guint time) { 2136 guint info, guint time) {
2137 bool success = false; 2137 bool success = false;
James Hawkins 2011/11/21 17:33:59 |success| is not unused.
2138 2138
2139 if (info == ui::TEXT_URI_LIST || 2139 if (info == ui::TEXT_URI_LIST ||
2140 info == ui::NETSCAPE_URL || 2140 info == ui::NETSCAPE_URL ||
2141 info == ui::TEXT_PLAIN) { 2141 info == ui::TEXT_PLAIN) {
2142 success = CompleteDrop(data->data, info == ui::TEXT_PLAIN); 2142 success = CompleteDrop(data->data, info == ui::TEXT_PLAIN);
2143 } 2143 }
2144 2144
2145 gtk_drag_finish(context, success, success, time); 2145 gtk_drag_finish(context, success, FALSE, time);
2146 return TRUE; 2146 return TRUE;
2147 } 2147 }
2148 2148
2149 void TabStripGtk::OnNewTabClicked(GtkWidget* widget) { 2149 void TabStripGtk::OnNewTabClicked(GtkWidget* widget) {
2150 GdkEvent* event = gtk_get_current_event(); 2150 GdkEvent* event = gtk_get_current_event();
2151 DCHECK_EQ(event->type, GDK_BUTTON_RELEASE); 2151 DCHECK_EQ(event->type, GDK_BUTTON_RELEASE);
2152 int mouse_button = event->button.button; 2152 int mouse_button = event->button.button;
2153 gdk_event_free(event); 2153 gdk_event_free(event);
2154 2154
2155 switch (mouse_button) { 2155 switch (mouse_button) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 } 2229 }
2230 2230
2231 void TabStripGtk::SetNewTabButtonBackground() { 2231 void TabStripGtk::SetNewTabButtonBackground() {
2232 SkColor color = theme_service_->GetColor( 2232 SkColor color = theme_service_->GetColor(
2233 ThemeService::COLOR_BUTTON_BACKGROUND); 2233 ThemeService::COLOR_BUTTON_BACKGROUND);
2234 SkBitmap* background = theme_service_->GetBitmapNamed( 2234 SkBitmap* background = theme_service_->GetBitmapNamed(
2235 IDR_THEME_WINDOW_CONTROL_BACKGROUND); 2235 IDR_THEME_WINDOW_CONTROL_BACKGROUND);
2236 SkBitmap* mask = theme_service_->GetBitmapNamed(IDR_NEWTAB_BUTTON_MASK); 2236 SkBitmap* mask = theme_service_->GetBitmapNamed(IDR_NEWTAB_BUTTON_MASK);
2237 newtab_button_->SetBackground(color, background, mask); 2237 newtab_button_->SetBackground(color, background, mask);
2238 } 2238 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698