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

Side by Side Diff: chrome/browser/views/tab_contents/tab_contents_view_gtk.cc

Issue 1084003: Fix HTML5 effectAllowed and dragEffect on Chrome Linux. (Closed)
Patch Set: actual Created 10 years, 9 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
« no previous file with comments | « chrome/browser/tab_contents/web_drag_dest_gtk.cc ('k') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/tab_contents/tab_contents_view_gtk.h" 5 #include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "app/gfx/canvas_paint.h" 10 #include "app/gfx/canvas_paint.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Callers expect the requested bounds not the actual bounds. For example, 215 // Callers expect the requested bounds not the actual bounds. For example,
216 // during init callers expect 0x0, but Gtk layout enforces a min size of 1x1. 216 // during init callers expect 0x0, but Gtk layout enforces a min size of 1x1.
217 out->set_width(GetNativeView()->requisition.width); 217 out->set_width(GetNativeView()->requisition.width);
218 out->set_height(GetNativeView()->requisition.height); 218 out->set_height(GetNativeView()->requisition.height);
219 } 219 }
220 220
221 void TabContentsViewGtk::StartDragging(const WebDropData& drop_data, 221 void TabContentsViewGtk::StartDragging(const WebDropData& drop_data,
222 WebDragOperationsMask ops, 222 WebDragOperationsMask ops,
223 const SkBitmap& image, 223 const SkBitmap& image,
224 const gfx::Point& image_offset) { 224 const gfx::Point& image_offset) {
225 drag_source_->StartDragging(drop_data, &last_mouse_down_, 225 drag_source_->StartDragging(drop_data, ops, &last_mouse_down_,
226 image, image_offset); 226 image, image_offset);
227 // TODO(snej): Make use of WebDragOperationsMask
228 } 227 }
229 228
230 void TabContentsViewGtk::SetPageTitle(const std::wstring& title) { 229 void TabContentsViewGtk::SetPageTitle(const std::wstring& title) {
231 // Set the window name to include the page title so it's easier to spot 230 // Set the window name to include the page title so it's easier to spot
232 // when debugging (e.g. via xwininfo -tree). 231 // when debugging (e.g. via xwininfo -tree).
233 gfx::NativeView content_view = GetContentNativeView(); 232 gfx::NativeView content_view = GetContentNativeView();
234 if (content_view && content_view->window) 233 if (content_view && content_view->window)
235 gdk_window_set_title(content_view->window, WideToUTF8(title).c_str()); 234 gdk_window_set_title(content_view->window, WideToUTF8(title).c_str());
236 } 235 }
237 236
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 // not NULL, else our delegate. 440 // not NULL, else our delegate.
442 gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget, 441 gboolean TabContentsViewGtk::OnMouseMove(GtkWidget* widget,
443 GdkEventMotion* event) { 442 GdkEventMotion* event) {
444 if (sad_tab_ != NULL) 443 if (sad_tab_ != NULL)
445 WidgetGtk::OnMotionNotify(widget, event); 444 WidgetGtk::OnMotionNotify(widget, event);
446 else if (tab_contents()->delegate()) 445 else if (tab_contents()->delegate())
447 tab_contents()->delegate()->ContentsMouseEvent( 446 tab_contents()->delegate()->ContentsMouseEvent(
448 tab_contents(), views::Screen::GetCursorScreenPoint(), true); 447 tab_contents(), views::Screen::GetCursorScreenPoint(), true);
449 return FALSE; 448 return FALSE;
450 } 449 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/web_drag_dest_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698