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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 10 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 | « ui/views/view.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.cc » ('j') | 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) 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 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" 5 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 10
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 } 1179 }
1180 1180
1181 void DesktopDragDropClientAuraX11::CreateDragWidget( 1181 void DesktopDragDropClientAuraX11::CreateDragWidget(
1182 const gfx::ImageSkia& image) { 1182 const gfx::ImageSkia& image) {
1183 Widget* widget = new Widget; 1183 Widget* widget = new Widget;
1184 Widget::InitParams params(Widget::InitParams::TYPE_DRAG); 1184 Widget::InitParams params(Widget::InitParams::TYPE_DRAG);
1185 params.opacity = Widget::InitParams::OPAQUE_WINDOW; 1185 params.opacity = Widget::InitParams::OPAQUE_WINDOW;
1186 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 1186 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
1187 params.accept_events = false; 1187 params.accept_events = false;
1188 1188
1189 gfx::Point location = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint() - 1189 gfx::Point location =
1190 drag_widget_offset_; 1190 gfx::Screen::GetScreen()->GetCursorScreenPoint() - drag_widget_offset_;
1191 params.bounds = gfx::Rect(location, image.size()); 1191 params.bounds = gfx::Rect(location, image.size());
1192 widget->set_focus_on_creation(false); 1192 widget->set_focus_on_creation(false);
1193 widget->set_frame_type(Widget::FRAME_TYPE_FORCE_NATIVE); 1193 widget->set_frame_type(Widget::FRAME_TYPE_FORCE_NATIVE);
1194 widget->Init(params); 1194 widget->Init(params);
1195 widget->SetOpacity(kDragWidgetOpacity); 1195 widget->SetOpacity(kDragWidgetOpacity);
1196 widget->GetNativeWindow()->SetName("DragWindow"); 1196 widget->GetNativeWindow()->SetName("DragWindow");
1197 1197
1198 ImageView* image_view = new ImageView(); 1198 ImageView* image_view = new ImageView();
1199 image_view->SetImage(image); 1199 image_view->SetImage(image);
1200 image_view->SetBounds(0, 0, image.width(), image.height()); 1200 image_view->SetBounds(0, 0, image.width(), image.height());
(...skipping 20 matching lines...) Expand all
1221 for (int x = 0; x < in_bitmap->width(); ++x) { 1221 for (int x = 0; x < in_bitmap->width(); ++x) {
1222 if (SkColorGetA(in_row[x]) > kMinAlpha) 1222 if (SkColorGetA(in_row[x]) > kMinAlpha)
1223 return true; 1223 return true;
1224 } 1224 }
1225 } 1225 }
1226 1226
1227 return false; 1227 return false;
1228 } 1228 }
1229 1229
1230 } // namespace views 1230 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/view.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698