OLD | NEW |
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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 int operation, | 787 int operation, |
788 ui::DragDropTypes::DragEventSource source) { | 788 ui::DragDropTypes::DragEventSource source) { |
789 dragged_view_ = view; | 789 dragged_view_ = view; |
790 native_widget_->RunShellDrag(view, data, location, operation, source); | 790 native_widget_->RunShellDrag(view, data, location, operation, source); |
791 // If the view is removed during the drag operation, dragged_view_ is set to | 791 // If the view is removed during the drag operation, dragged_view_ is set to |
792 // NULL. | 792 // NULL. |
793 if (view && dragged_view_ == view) { | 793 if (view && dragged_view_ == view) { |
794 dragged_view_ = NULL; | 794 dragged_view_ = NULL; |
795 view->OnDragDone(); | 795 view->OnDragDone(); |
796 } | 796 } |
| 797 OnDragComplete(); |
797 } | 798 } |
798 | 799 |
799 void Widget::SchedulePaintInRect(const gfx::Rect& rect) { | 800 void Widget::SchedulePaintInRect(const gfx::Rect& rect) { |
800 native_widget_->SchedulePaintInRect(rect); | 801 native_widget_->SchedulePaintInRect(rect); |
801 } | 802 } |
802 | 803 |
803 void Widget::SetCursor(gfx::NativeCursor cursor) { | 804 void Widget::SetCursor(gfx::NativeCursor cursor) { |
804 native_widget_->SetCursor(cursor); | 805 native_widget_->SetCursor(cursor); |
805 } | 806 } |
806 | 807 |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1388 return new internal::RootView(this); | 1389 return new internal::RootView(this); |
1389 } | 1390 } |
1390 | 1391 |
1391 void Widget::DestroyRootView() { | 1392 void Widget::DestroyRootView() { |
1392 non_client_view_ = NULL; | 1393 non_client_view_ = NULL; |
1393 root_view_.reset(); | 1394 root_view_.reset(); |
1394 // Input method has to be destroyed before focus manager. | 1395 // Input method has to be destroyed before focus manager. |
1395 input_method_.reset(); | 1396 input_method_.reset(); |
1396 } | 1397 } |
1397 | 1398 |
| 1399 void Widget::OnDragComplete() { |
| 1400 } |
| 1401 |
1398 //////////////////////////////////////////////////////////////////////////////// | 1402 //////////////////////////////////////////////////////////////////////////////// |
1399 // Widget, private: | 1403 // Widget, private: |
1400 | 1404 |
1401 void Widget::SetInactiveRenderingDisabled(bool value) { | 1405 void Widget::SetInactiveRenderingDisabled(bool value) { |
1402 if (value == disable_inactive_rendering_) | 1406 if (value == disable_inactive_rendering_) |
1403 return; | 1407 return; |
1404 | 1408 |
1405 disable_inactive_rendering_ = value; | 1409 disable_inactive_rendering_ = value; |
1406 if (non_client_view_) | 1410 if (non_client_view_) |
1407 non_client_view_->SetInactiveRenderingDisabled(value); | 1411 non_client_view_->SetInactiveRenderingDisabled(value); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 | 1510 |
1507 //////////////////////////////////////////////////////////////////////////////// | 1511 //////////////////////////////////////////////////////////////////////////////// |
1508 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1512 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1509 | 1513 |
1510 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1514 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1511 return this; | 1515 return this; |
1512 } | 1516 } |
1513 | 1517 |
1514 } // namespace internal | 1518 } // namespace internal |
1515 } // namespace views | 1519 } // namespace views |
OLD | NEW |