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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
6 | 6 |
7 #include "ui/views/view.h" | 7 #include "ui/views/view.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #include "ui/views/widget/native_widget_private.h" | 61 #include "ui/views/widget/native_widget_private.h" |
62 #include "ui/views/widget/root_view.h" | 62 #include "ui/views/widget/root_view.h" |
63 #include "ui/views/widget/tooltip_manager.h" | 63 #include "ui/views/widget/tooltip_manager.h" |
64 #include "ui/views/widget/widget.h" | 64 #include "ui/views/widget/widget.h" |
65 | 65 |
66 #if defined(OS_WIN) | 66 #if defined(OS_WIN) |
67 #include "base/win/scoped_gdi_object.h" | 67 #include "base/win/scoped_gdi_object.h" |
68 #include "ui/native_theme/native_theme_win.h" | 68 #include "ui/native_theme/native_theme_win.h" |
69 #endif | 69 #endif |
70 | 70 |
| 71 DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(VIEWS_EXPORT, gfx::Insets*); |
| 72 |
71 namespace views { | 73 namespace views { |
72 | 74 |
73 namespace { | 75 namespace { |
74 | 76 |
75 #if defined(OS_WIN) | 77 #if defined(OS_WIN) |
76 const bool kContextMenuOnMousePress = false; | 78 const bool kContextMenuOnMousePress = false; |
77 #else | 79 #else |
78 const bool kContextMenuOnMousePress = true; | 80 const bool kContextMenuOnMousePress = true; |
79 #endif | 81 #endif |
80 | 82 |
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2663 | 2665 |
2664 // Message the RootView to do the drag and drop. That way if we're removed | 2666 // Message the RootView to do the drag and drop. That way if we're removed |
2665 // the RootView can detect it and avoid calling us back. | 2667 // the RootView can detect it and avoid calling us back. |
2666 gfx::Point widget_location(event.location()); | 2668 gfx::Point widget_location(event.location()); |
2667 ConvertPointToWidget(this, &widget_location); | 2669 ConvertPointToWidget(this, &widget_location); |
2668 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2670 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
2669 // WARNING: we may have been deleted. | 2671 // WARNING: we may have been deleted. |
2670 return true; | 2672 return true; |
2671 } | 2673 } |
2672 | 2674 |
| 2675 DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Insets, kMarginsKey, nullptr); |
| 2676 |
2673 } // namespace views | 2677 } // namespace views |
OLD | NEW |