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

Side by Side Diff: ui/views/widget/native_widget_aura.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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 | Annotate | Revision Log
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/native_widget_aura.h" 5 #include "ui/views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 if (client) // NULL during destruction of aura::Window. 901 if (client) // NULL during destruction of aura::Window.
902 delegate_->OnNativeBlur(client->GetFocusedWindow()); 902 delegate_->OnNativeBlur(client->GetFocusedWindow());
903 } 903 }
904 } 904 }
905 905
906 //////////////////////////////////////////////////////////////////////////////// 906 ////////////////////////////////////////////////////////////////////////////////
907 // NativeWidgetAura, aura::WindowDragDropDelegate implementation: 907 // NativeWidgetAura, aura::WindowDragDropDelegate implementation:
908 908
909 void NativeWidgetAura::OnDragEntered(const ui::DropTargetEvent& event) { 909 void NativeWidgetAura::OnDragEntered(const ui::DropTargetEvent& event) {
910 DCHECK(drop_helper_.get() != NULL); 910 DCHECK(drop_helper_.get() != NULL);
911 last_drop_operation_ = drop_helper_->OnDragOver(event.data(), 911 last_drop_operation_ =
912 event.location(), event.source_operations()); 912 drop_helper_->OnDragOver(event.data(),
913 gfx::ToFlooredPoint(event.location()),
914 event.source_operations());
913 } 915 }
914 916
915 int NativeWidgetAura::OnDragUpdated(const ui::DropTargetEvent& event) { 917 int NativeWidgetAura::OnDragUpdated(const ui::DropTargetEvent& event) {
916 DCHECK(drop_helper_.get() != NULL); 918 DCHECK(drop_helper_.get() != NULL);
917 last_drop_operation_ = drop_helper_->OnDragOver(event.data(), 919 last_drop_operation_ =
918 event.location(), event.source_operations()); 920 drop_helper_->OnDragOver(event.data(),
921 gfx::ToFlooredPoint(event.location()),
922 event.source_operations());
919 return last_drop_operation_; 923 return last_drop_operation_;
920 } 924 }
921 925
922 void NativeWidgetAura::OnDragExited() { 926 void NativeWidgetAura::OnDragExited() {
923 DCHECK(drop_helper_.get() != NULL); 927 DCHECK(drop_helper_.get() != NULL);
924 drop_helper_->OnDragExit(); 928 drop_helper_->OnDragExit();
925 } 929 }
926 930
927 int NativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) { 931 int NativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
928 DCHECK(drop_helper_.get() != NULL); 932 DCHECK(drop_helper_.get() != NULL);
929 return drop_helper_->OnDrop(event.data(), event.location(), 933 return drop_helper_->OnDrop(event.data(),
930 last_drop_operation_); 934 gfx::ToFlooredPoint(event.location()),
935 last_drop_operation_);
931 } 936 }
932 937
933 //////////////////////////////////////////////////////////////////////////////// 938 ////////////////////////////////////////////////////////////////////////////////
934 // NativeWidgetAura, NativeWidget implementation: 939 // NativeWidgetAura, NativeWidget implementation:
935 940
936 ui::EventHandler* NativeWidgetAura::GetEventHandler() { 941 ui::EventHandler* NativeWidgetAura::GetEventHandler() {
937 return this; 942 return this;
938 } 943 }
939 944
940 //////////////////////////////////////////////////////////////////////////////// 945 ////////////////////////////////////////////////////////////////////////////////
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont)); 1145 l10n_util::AdjustUIFont(&(ncm.lfCaptionFont));
1141 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont))); 1146 base::win::ScopedHFONT caption_font(CreateFontIndirect(&(ncm.lfCaptionFont)));
1142 return gfx::FontList(gfx::Font(caption_font)); 1147 return gfx::FontList(gfx::Font(caption_font));
1143 #else 1148 #else
1144 return gfx::FontList(); 1149 return gfx::FontList();
1145 #endif 1150 #endif
1146 } 1151 }
1147 1152
1148 } // namespace internal 1153 } // namespace internal
1149 } // namespace views 1154 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698