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

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

Issue 11368072: aura: Add flag to indicate if a drag session is started with touch or mouse. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 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 | « ui/views/widget/widget.h ('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) 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/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/events/event.h" 10 #include "ui/base/events/event.h"
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 // TODO(oshima): Fix GetTopLevelWidget() to return NULL 701 // TODO(oshima): Fix GetTopLevelWidget() to return NULL
702 // if there is no toplevel. We probably need to add GetTopMostWidget() 702 // if there is no toplevel. We probably need to add GetTopMostWidget()
703 // to replace some use cases. 703 // to replace some use cases.
704 return (toplevel && toplevel != this) ? toplevel->GetInputMethod() : NULL; 704 return (toplevel && toplevel != this) ? toplevel->GetInputMethod() : NULL;
705 } 705 }
706 } 706 }
707 707
708 void Widget::RunShellDrag(View* view, 708 void Widget::RunShellDrag(View* view,
709 const ui::OSExchangeData& data, 709 const ui::OSExchangeData& data,
710 const gfx::Point& location, 710 const gfx::Point& location,
711 int operation) { 711 int operation,
712 ui::DragDropTypes::DragEventSource source) {
712 dragged_view_ = view; 713 dragged_view_ = view;
713 native_widget_->RunShellDrag(view, data, location, operation); 714 native_widget_->RunShellDrag(view, data, location, operation, source);
714 // If the view is removed during the drag operation, dragged_view_ is set to 715 // If the view is removed during the drag operation, dragged_view_ is set to
715 // NULL. 716 // NULL.
716 if (view && dragged_view_ == view) { 717 if (view && dragged_view_ == view) {
717 dragged_view_ = NULL; 718 dragged_view_ = NULL;
718 view->OnDragDone(); 719 view->OnDragDone();
719 } 720 }
720 } 721 }
721 722
722 void Widget::SchedulePaintInRect(const gfx::Rect& rect) { 723 void Widget::SchedulePaintInRect(const gfx::Rect& rect) {
723 native_widget_->SchedulePaintInRect(rect); 724 native_widget_->SchedulePaintInRect(rect);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 1365
1365 //////////////////////////////////////////////////////////////////////////////// 1366 ////////////////////////////////////////////////////////////////////////////////
1366 // internal::NativeWidgetPrivate, NativeWidget implementation: 1367 // internal::NativeWidgetPrivate, NativeWidget implementation:
1367 1368
1368 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1369 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1369 return this; 1370 return this;
1370 } 1371 }
1371 1372
1372 } // namespace internal 1373 } // namespace internal
1373 } // namespace views 1374 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698