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

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

Issue 2656853002: [Web Payments] Refactor the row display code. (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « ui/views/view.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 #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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Creation and lifetime ------------------------------------------------------- 123 // Creation and lifetime -------------------------------------------------------
124 124
125 View::View() 125 View::View()
126 : owned_by_client_(false), 126 : owned_by_client_(false),
127 id_(0), 127 id_(0),
128 group_(-1), 128 group_(-1),
129 parent_(NULL), 129 parent_(NULL),
130 #if DCHECK_IS_ON() 130 #if DCHECK_IS_ON()
131 iterating_(false), 131 iterating_(false),
132 #endif 132 #endif
133 can_process_events_within_subtree_(true),
133 visible_(true), 134 visible_(true),
134 enabled_(true), 135 enabled_(true),
135 notify_enter_exit_on_child_(false), 136 notify_enter_exit_on_child_(false),
136 registered_for_visible_bounds_notification_(false), 137 registered_for_visible_bounds_notification_(false),
137 needs_layout_(true), 138 needs_layout_(true),
138 snap_layer_to_pixel_boundary_(false), 139 snap_layer_to_pixel_boundary_(false),
139 flip_canvas_on_paint_for_rtl_ui_(false), 140 flip_canvas_on_paint_for_rtl_ui_(false),
140 paint_to_layer_(false), 141 paint_to_layer_(false),
141 accelerator_focus_manager_(NULL), 142 accelerator_focus_manager_(NULL),
142 registered_accelerator_count_(0), 143 registered_accelerator_count_(0),
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 982
982 View* View::GetEventHandlerForPoint(const gfx::Point& point) { 983 View* View::GetEventHandlerForPoint(const gfx::Point& point) {
983 return GetEventHandlerForRect(gfx::Rect(point, gfx::Size(1, 1))); 984 return GetEventHandlerForRect(gfx::Rect(point, gfx::Size(1, 1)));
984 } 985 }
985 986
986 View* View::GetEventHandlerForRect(const gfx::Rect& rect) { 987 View* View::GetEventHandlerForRect(const gfx::Rect& rect) {
987 return GetEffectiveViewTargeter()->TargetForRect(this, rect); 988 return GetEffectiveViewTargeter()->TargetForRect(this, rect);
988 } 989 }
989 990
990 bool View::CanProcessEventsWithinSubtree() const { 991 bool View::CanProcessEventsWithinSubtree() const {
991 return true; 992 return can_process_events_within_subtree_;
992 } 993 }
993 994
994 View* View::GetTooltipHandlerForPoint(const gfx::Point& point) { 995 View* View::GetTooltipHandlerForPoint(const gfx::Point& point) {
995 // TODO(tdanderson): Move this implementation into ViewTargetDelegate. 996 // TODO(tdanderson): Move this implementation into ViewTargetDelegate.
996 if (!HitTestPoint(point) || !CanProcessEventsWithinSubtree()) 997 if (!HitTestPoint(point) || !CanProcessEventsWithinSubtree())
997 return NULL; 998 return NULL;
998 999
999 // Walk the child Views recursively looking for the View that most 1000 // Walk the child Views recursively looking for the View that most
1000 // tightly encloses the specified point. 1001 // tightly encloses the specified point.
1001 View::Views children = GetChildrenInZOrder(); 1002 View::Views children = GetChildrenInZOrder();
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 // Message the RootView to do the drag and drop. That way if we're removed 2551 // Message the RootView to do the drag and drop. That way if we're removed
2551 // the RootView can detect it and avoid calling us back. 2552 // the RootView can detect it and avoid calling us back.
2552 gfx::Point widget_location(event.location()); 2553 gfx::Point widget_location(event.location());
2553 ConvertPointToWidget(this, &widget_location); 2554 ConvertPointToWidget(this, &widget_location);
2554 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2555 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2555 // WARNING: we may have been deleted. 2556 // WARNING: we may have been deleted.
2556 return true; 2557 return true;
2557 } 2558 }
2558 2559
2559 } // namespace views 2560 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698