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

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

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_mac.cc » ('j') | 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 #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 26 matching lines...) Expand all
37 #include "ui/native_theme/native_theme.h" 37 #include "ui/native_theme/native_theme.h"
38 #include "ui/views/accessibility/native_view_accessibility.h" 38 #include "ui/views/accessibility/native_view_accessibility.h"
39 #include "ui/views/background.h" 39 #include "ui/views/background.h"
40 #include "ui/views/border.h" 40 #include "ui/views/border.h"
41 #include "ui/views/context_menu_controller.h" 41 #include "ui/views/context_menu_controller.h"
42 #include "ui/views/drag_controller.h" 42 #include "ui/views/drag_controller.h"
43 #include "ui/views/focus/view_storage.h" 43 #include "ui/views/focus/view_storage.h"
44 #include "ui/views/layout/layout_manager.h" 44 #include "ui/views/layout/layout_manager.h"
45 #include "ui/views/rect_based_targeting_utils.h" 45 #include "ui/views/rect_based_targeting_utils.h"
46 #include "ui/views/views_delegate.h" 46 #include "ui/views/views_delegate.h"
47 #include "ui/views/widget/native_widget_private.h" 47 //#include "ui/views/widget/native_widget_private.h"
48 #include "ui/views/widget/root_view.h" 48 #include "ui/views/widget/root_view.h"
49 #include "ui/views/widget/tooltip_manager.h" 49 #include "ui/views/widget/tooltip_manager.h"
50 #include "ui/views/widget/widget.h" 50 #include "ui/views/widget/widget.h"
51 51
52 #if defined(OS_WIN) 52 #if defined(OS_WIN)
53 #include "base/win/scoped_gdi_object.h" 53 #include "base/win/scoped_gdi_object.h"
54 #endif 54 #endif
55 55
56 namespace { 56 namespace {
57 57
(...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 Widget* widget = GetWidget(); 2341 Widget* widget = GetWidget();
2342 // We should only start a drag from an event, implying we have a widget. 2342 // We should only start a drag from an event, implying we have a widget.
2343 DCHECK(widget); 2343 DCHECK(widget);
2344 2344
2345 // Don't attempt to start a drag while in the process of dragging. This is 2345 // Don't attempt to start a drag while in the process of dragging. This is
2346 // especially important on X where we can get multiple mouse move events when 2346 // especially important on X where we can get multiple mouse move events when
2347 // we start the drag. 2347 // we start the drag.
2348 if (widget->dragged_view()) 2348 if (widget->dragged_view())
2349 return false; 2349 return false;
2350 2350
2351 #ifdef FIXME
2351 OSExchangeData data; 2352 OSExchangeData data;
2352 WriteDragData(press_pt, &data); 2353 WriteDragData(press_pt, &data);
2353 2354
2354 // Message the RootView to do the drag and drop. That way if we're removed 2355 // Message the RootView to do the drag and drop. That way if we're removed
2355 // the RootView can detect it and avoid calling us back. 2356 // the RootView can detect it and avoid calling us back.
2356 gfx::Point widget_location(event.location()); 2357 gfx::Point widget_location(event.location());
2357 ConvertPointToWidget(this, &widget_location); 2358 ConvertPointToWidget(this, &widget_location);
2358 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2359 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2359 // WARNING: we may have been deleted. 2360 // WARNING: we may have been deleted.
2360 return true; 2361 return true;
2362 #else
2363 return false;
2364 #endif
2361 } 2365 }
2362 2366
2363 } // namespace views 2367 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698