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

Unified Diff: content/browser/web_contents/web_contents_view_aura.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: fixes Created 4 years, 11 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
Index: content/browser/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index a899bf3310432a94005c43bb5e7b1cab8dd8053d..66f6c1f878ab0c2399012a84c6f78a0ff62fce56 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -688,8 +688,7 @@ void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) {
void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) {
aura::Window* root_window = GetNativeView()->GetRootWindow();
- gfx::Point screen_loc =
- gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint();
+ gfx::Point screen_loc = gfx::Screen::GetScreen()->GetCursorScreenPoint();
gfx::Point client_loc = screen_loc;
RenderViewHost* rvh = web_contents_->GetRenderViewHost();
aura::Window* window = rvh->GetWidget()->GetView()->GetNativeView();
@@ -1197,8 +1196,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) {
web_contents_->GetDelegate()->ActivateContents(web_contents_);
web_contents_->GetDelegate()->ContentsMouseEvent(
- web_contents_,
- gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
+ web_contents_, gfx::Screen::GetScreen()->GetCursorScreenPoint(),
type == ui::ET_MOUSE_MOVED, type == ui::ET_MOUSE_EXITED);
}
@@ -1223,8 +1221,7 @@ void WebContentsViewAura::OnDragEntered(const ui::DropTargetEvent& event) {
if (drag_dest_delegate_)
drag_dest_delegate_->DragInitialize(web_contents_);
- gfx::Point screen_pt =
- gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint();
+ gfx::Point screen_pt = gfx::Screen::GetScreen()->GetCursorScreenPoint();
web_contents_->GetRenderViewHost()->DragTargetDragEnter(
*current_drop_data_.get(), event.location(), screen_pt, op,
ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
@@ -1244,8 +1241,7 @@ int WebContentsViewAura::OnDragUpdated(const ui::DropTargetEvent& event) {
return ui::DragDropTypes::DRAG_NONE;
blink::WebDragOperationsMask op = ConvertToWeb(event.source_operations());
- gfx::Point screen_pt =
- gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint();
+ gfx::Point screen_pt = gfx::Screen::GetScreen()->GetCursorScreenPoint();
web_contents_->GetRenderViewHost()->DragTargetDragOver(
event.location(), screen_pt, op,
ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
@@ -1280,8 +1276,7 @@ int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) {
return ui::DragDropTypes::DRAG_NONE;
web_contents_->GetRenderViewHost()->DragTargetDrop(
- event.location(),
- gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
+ event.location(), gfx::Screen::GetScreen()->GetCursorScreenPoint(),
ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
if (drag_dest_delegate_)
drag_dest_delegate_->OnDrop();

Powered by Google App Engine
This is Rietveld 408576698